Forum Moderators: open

Message Too Old, No Replies

Disabling submit button

         

Crump

4:24 pm on Mar 10, 2006 (gmt 0)

10+ Year Member



I see some sites that disable the submit button after it has been pressed to make sure it doesn't get clicked twice. Also they change the text inside the button (or new text appears next to it saying "Processing..." or something like that).

I take it this is done in javascript, but I couldn't find the answer on the net anywhere.

Any tips?

Fotiman

4:29 pm on Mar 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



It's probably just an onclick event handler for the button. For example:

<input type="submit" name="submit" value="submit" onclick="this.disabled=true;this.value='Processing...';">