I have a file upload page.recently i am facing a problem ie. When i continously click on submit button the form gets submited as many times i click the button.. So kindly help me. Thank you in advance.
Asked
Active
Viewed 281 times
0
-
What language is this page written in? Can you add the relevant code from your page to your question? If you can use javascript on your page, solutions from this SO post might work for you: http://stackoverflow.com/questions/3186523/onclick-disable-submit-button. There are a lot of questions on StackOverflow that answer this type of question, so I'd also encourage you to look at what posts are already around and answered. – user937146 Mar 19 '12 at 09:36
2 Answers
1
Instead of removing the button... just disable it, it's more user friendly
<form onsubmit="JavaScript:document.getElementById('submitbtn').disabled=true" >
<input type="submit" id="submitbtn">
</form>

Arsh Singh
- 2,038
- 15
- 16
0
I have something similar for my phpBB formpost. :)
<div class="inner">
<fieldset id="buttons">
<input type="submit" name="post" value="Submit" onclick="JavaScript:document.getElementById('buttons').style.display='none';document.getElementById('processingsub').style.display='block';" />
</fieldset>
<fieldset id="processingsub" style="display:none;">
<input type="button" value="Sending Post - Please wait..." disabled="disabled" />
</fieldset>
</div>

hjpotter92
- 78,589
- 36
- 144
- 183