Portal Home > Knowledgebase > Programing > Html > Disable Submit button after being pressed


Disable Submit button after being pressed




If you want to diable the Submit Button on a form after the button has been pressed then use the following code for the submit button.

Once pressed it replaces the text with " Please wait... " and stops the button being pressed again.

**CODE**

< input name="BtnSubmit" value="Login" onclick="this.value = ' Please wait... ';this.disabled = true;theForm.submit();" id="BtnSubmit" style="width: 120px;" type="submit" >

**End Of Code**



Was this answer helpful?

Add to Favourites Add to Favourites    Print this Article Print this Article


Powered by WHMCompleteSolution