How To Avoid Multiple Submit
RegisterLogin
How To Avoid Multiple Submit
Post Description: How To Avoid Multiple Submit
Tags: how, to, avoid, multiple, submit
This Post Was Posted On Jul 02, 2009 By wallpaperama #66
Post Description: How To Avoid Multiple Submit
Tags: how, to, avoid, multiple, submit
This Post Was Posted On Jul 02, 2009 By wallpaperama #66
How To Avoid Multiple Submit by wallpaperama
This short tutorial will show you how to avoid multiple submissions from users by disabling the submit button once the form has been submitted
Example Tutorial by wallpaperama.com
Here is the code i used:
<script type="text/javascript">
<!--
function checkForm(form)
{
//
// check form input values
//
form.SubmitButton.disabled = true;
form.SubmitButton.value = "Please wait...";
return true;
}
function resetForm(form)
{
form.SubmitButton.disabled = false;
form.SubmitButton.value = "Submit";
}
// -->
</script>
<p>This short tutorial will show you how to avoid multiple submissions from users by disabling the submit button once the form has been submitted </p>
<form method="POST" action="http://www.wallpaperama.com" onSubmit="return checkForm(this) && false;">
<p>Your Name:
<input type="text" name="textfield">
(put whatever you want) </p>
<p>Your Comments:
<textarea name="textarea"></textarea>
(put whatever you want)</p>
<p>Notice once you hit the Submit button, you will see the "Submit" change to "Please wait..." and you won't be able to submit the form again. </p>
<p>
<input type="submit" name="SubmitButton" value="Submit">
</p>
</form>
<p align="left"><a href="http://www.wallpaperama.com/forums"><< Go Back</a></p>
<p align="center">Example Tutorial by <a href="http://www.wallpaperama.com">wallpaperama.com</a> </p>
<!--
function checkForm(form)
{
//
// check form input values
//
form.SubmitButton.disabled = true;
form.SubmitButton.value = "Please wait...";
return true;
}
function resetForm(form)
{
form.SubmitButton.disabled = false;
form.SubmitButton.value = "Submit";
}
// -->
</script>
<p>This short tutorial will show you how to avoid multiple submissions from users by disabling the submit button once the form has been submitted </p>
<form method="POST" action="http://www.wallpaperama.com" onSubmit="return checkForm(this) && false;">
<p>Your Name:
<input type="text" name="textfield">
(put whatever you want) </p>
<p>Your Comments:
<textarea name="textarea"></textarea>
(put whatever you want)</p>
<p>Notice once you hit the Submit button, you will see the "Submit" change to "Please wait..." and you won't be able to submit the form again. </p>
<p>
<input type="submit" name="SubmitButton" value="Submit">
</p>
</form>
<p align="left"><a href="http://www.wallpaperama.com/forums"><< Go Back</a></p>
<p align="center">Example Tutorial by <a href="http://www.wallpaperama.com">wallpaperama.com</a> </p>
Leave Your Comments
Related Pages: [Add Your Website]
Post New Topic
©2011 Broken Deals - Mon Dec 19, 2011 2:05 am
Powered by: Webune Forums V3
Powered by: Webune Forums V3