Hello i am new to Jscript.
I want to stop multiple submission of forms. I have a function to do that but it doesn't work if Jscript is not enabled. So i extended my function to check whether Jscript is enabled or not. So what i want to do now is to call that function (which stops multiple submission) when the user clicks on submit button, so if user have Jscript disabled it won't work at all and if Jscript is enabled , should work, so how i can call this function from <input type="..." method"post" action=" "...........> statement. Thanks.......
Multiple Form submission
Moderator: General Moderators
onClick or onSubmit
Well it depends where you want to call this function
if it attached to a button
if is on the action of the form
Try these examples and one should work for you.
phpScott
if it attached to a button
Code: Select all
<input type="button" name="submit" value="Submit Form" onClick="someFunction()" />Code: Select all
<form name="formName" method="post" onSubmit="someFunction()">phpScott