开发者

jquery message problem

开发者 https://www.devze.com 2023-01-26 16:11 出处:网络
I\'ve got this registration form: http://www.topgamedb.com/register If you enter a captcha (the wrong or the right one, it does not display a message next to it)

I've got this registration form: http://www.topgamedb.com/register

If you enter a captcha (the wrong or the right one, it does not display a message next to it)

If you click Register, it does not display errors, it submits the form.

http://www.topgamedb.com/css/registration.css

http://www.topgamedb.com/js/registration.js

I have this working on another website, but after copying it over to this new website, I can't seem to get it to work. I'm obviously missiong something 'obvious' - its late and I haven't slept and I开发者_开发问答'll probably kick myself when I see whats wrong.

Any help is greatly appreciated.


Number 1, firebug is giving me an error that jQuery.md5 doesn't exist. Do you have another library that you added on to make this work?


You need to prevent the default behavior of the button (submitting the form):

$(register_button).click(function () {
    // do validation, etc.

    // submit form using $(your_form).submit();
    // if values are passing validation

    // prevent the form from being submitted immediately
    return false;
});
0

精彩评论

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