jquery stops working after php page posted
I added some jquery to my php page to 1. do some simple validation before the page gets posted and 2. I have a button called Reset that clears some fields and submits the page. Both work fine, that is to say if I load the page and click the submit button and the appropriate field/s is not valued I get an error message. If I click the Reset button, the page does resubmit. If I click the submit button and all validation criteria is met, the page does the post back I get the correct results on the page. That said, once the post back occurs if I click the Reset button nothing happens, where it worked fine when the page was first called and if I click the submit button the page posts, but bypasses all the jquery validation. Could someone explain to me why the jquery is no longer working after the page post and where I should look to fix the problem.
Thanks,
Tom
$('#cmdReset').click(function(){
$('#txtStartDate').val("");
$('#txtEndDate').val("");
window.location.href = "emailsearch.php";
return false;
});