On Import, how to prevent user from hitting button again 

On Import, how to prevent user from hitting button again 

  
I have a screen to do an excel import. The import can take about 1 minute. While it's running, I don't want the user to press the button again. How can I prevent it?

I think this should work:

1. Create a boolean variable and set it to true.  Use this attribute on your "Import" link where it says "enabled".  Default value will be "true"
2. When the user clicks the button, set the boolean value to "false" and do an ajax refresh to disable the link.
3. Renable the link after the action finishes and do another ajax refresh.
 

Becky wrote:

I think this should work:

1. Create a boolean variable and set it to true.  Use this attribute on your "Import" link where it says "enabled".  Default value will be "true"
2. When the user clicks the button, set the boolean value to "false" and do an ajax refresh to disable the link.
3. Renable the link after the action finishes and do another ajax refresh.
 

 
 I can't because the button needs to use Submit otherwise the Excel import won't work. At the moment, I'm trying to set the button to Ajax, run an action to disable it and click another hidden button to do the Submit, but I can't get  the Widget_Click to work. I just seems to get ignored and I don't know why...?
Add this code to the "onclick" event of your link:
"this.disabled=true;"
No. I have that and the button beyound not doing the submit , the page appears all  unformatted
You can create something similar to a loading screen, for example. blocking the whole screen when processing...