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
https://forums.phpfreaks.com/topic/36057-onsubmit/
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
https://forums.phpfreaks.com/topic/36057-onsubmit/#findComment-171199
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.