开发者

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;
    });
});​
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜