Latox
Latox

Reputation: 4695

jquery message problem

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.

Upvotes: 1

Views: 52

Answers (2)

jwueller
jwueller

Reputation: 30986

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

Upvotes: 0

Rahly
Rahly

Reputation: 1511

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?

Upvotes: 1

Related Questions