Jump to content

onsubmit


tauchai83

Recommended Posts

i wonder why the user still can go on with the registration process successfully by clicking button "submit" although i have use some javascript validation like onkeyPress-check numeric, and onblur checkpassword...it should block user from clicking the "submit" button to proceed...there are error msg pop up for them, but somehow they manage to regsiter it.....how can i solve this?

i use onSubmit and retun ValidateData() function (javascript)....can anyone explain where i did wrong?
Link to comment
Share on other sites

    If javascript is turned off in the users browser, none of your js code executes.  Which is why server side data validation is mandatory even if you do browser side validation.  The two choices are do server side data validation or do browser side data validation [i]plus[/i] server side data validation.  As well if a javascript error occurs before the 'return false;' statement that cancels normal form submital is reached, then the form will go ahead and submit anyways.
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.