Jquery Validation not working in IE7
Working on this site: http://changemyaddressform.com/ in regards to my Jquery.Validate and .Datepicker. Neither are working in IE7 which leads me to beleive I have something simple wrong...can anyone help this noobie?
Works fine in IE8, FF, Safari, etc - nothing super co开发者_Python百科mplicated, just using the built in .validate() function. Any idea why it would be ignoring all validation attempts in IE7 and just posting to the next page? I know formatting is off, but working on function before form at the moment.
Best,
Scott
mmm, I dont know, but this is what i would try
Change the button type to "button" instead of submit Add an onclick event calling a function and add the validation inside.
I had problems validating information when there is a submit button, some times the form is submitted not matter what. also this way you can add an Alert inside the onclick function to know if the function is executed or not.
Try like this:
$(document).ready(function() {
$("#commentForm").validate();
$("#datepicker").datepicker({
changeMonth: true,
changeYear: true
});
$('a.external_link').click(function() {
window.open(this.href, "WhyEmail?", "width=500,height=200,resizable=no,scrollbars=no,menubar=no,status=no,directories=no,toolbar=no");
return false;
});
});
精彩评论