How to stop the user from clicking a page submit button more than once PDF Print E-mail
Monday, 23 November 2009 23:26

The standard way to push the page data back to the APEX server is to use an HTML button. One issue with HTML buttons is that they can be clicked more than once, and under certain circumstances this can cause issues. To ensure that the button can only be pressed once you can do the following.

alter button settings so that inside the URL redirect section the URL target value is set to

javascript:this.disabled=true;doSubmit('SUBMIT')

Note that the value inside doSubmit('') is the same as the button name.

You can even go one step further and replace the text of the button to something relevant like "Submitting....". The following code does this

javascript:this.disabled=true;this.value='Submitting....';doSubmit('SUBMIT');

The button now looks like this when it has been clicked

Thats it, the button is now coded so that the user can only click it once to submit the page. Any further clicks are ignored.

Comments (3)
  • Stephen  - Great Tip!!
    This was perfect - exactly what I needed, thx
  • yiba  - How to stop the user from clicking a page submit b
    Hi,

    Is this solution applicable to the 3.2 release ? 'Cause it didn't work for me (My button is named "SAVE";)

    Thanx
  • admin
    this should work on all version of APEX, because its mainly just Javascript
Write comment
Your Contact Details:
Comment:
:angry::0:confused::cheer:B):evil::silly::dry::lol::kiss::D:pinch:
:(:shock::X:side::):P:unsure::woohoo::huh::whistle:;):s
:!::?::idea::arrow:
Security
Please input the anti-spam code that you can read in the image.
 
| More

Sponsored Links

Who's Online

We have 13 guests online