MattsBits
MattsBits - Brunel District

MattsBits

MattsBits RSS Feed - Subscribe Now!

10/06/2010 : Disable Apex Button On Mouse Click

Categories : | APEX | Views : 93 | Email Link Print

In APEX it is sometimes nice to disable a button once the user has clicked it. This can help prevent over enthusiastic users clicking the button more than once.

It is quite simple to do and you only have to paste a simple piece of JavaScript into the Button's "Button Display Attributes".

The following image shows the JavaScript within the "Attributes" :

disable_button_onclick.png


The required code is :

onmouseup="this.disabled=true;doSubmit('IMPORT');"


As the user releases their mouse button the button is disabled. The "doSubmit" command is required to complete the submit as disabling the button prevents the standard submit from firing.

In this example the Button request value is "IMPORT and is stated in both the JavaScript above and the Button's "Button Request" attribute.

Technorati Tags : | oracle | apex | javascript | disable | click |

Author : Matt Hawkins  Last Edited By : Matt Hawkins  Permalink : Disable Apex Button On Mouse Click

 
 
 
PHP Powered  MySQL Powered  Valid XHTML 1.0  Valid CSS  Firefox - Take Back The Web  EUKHost - Recommended Webhosting Solutions

MattHawkins CMS v2.0 - Copyright 2009-2010