Multiple Form submission

JavaScript and client side scripting.

Moderator: General Moderators

Post Reply
k_nitin2k
Forum Newbie
Posts: 5
Joined: Sun Mar 30, 2003 1:17 pm

Multiple Form submission

Post by k_nitin2k »

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.......
User avatar
phpScott
DevNet Resident
Posts: 1206
Joined: Wed Oct 09, 2002 6:51 pm
Location: Keele, U.K.

onClick or onSubmit

Post by phpScott »

Well it depends where you want to call this function
if it attached to a button

Code: Select all

<input type="button" name="submit" value="Submit Form" onClick="someFunction()" />
if is on the action of the form

Code: Select all

<form name="formName" method="post" onSubmit="someFunction()">
Try these examples and one should work for you.

phpScott
Post Reply