Friday, April 20, 2007

Disable submit button after click

A simple way is to use an onclick handler on the submit button to either disable or hide the button:

onclick="this.disabled=true"
onclick="this.visibility='hidden'"
onclick="this.display='none'"

Example:

<input name="btn" value="ACCEPT" type="submit" onclick="this.disabled=true" >

0 Comments:

Post a Comment

<< Home