Disable/Enable Link onClick

D

Dustin

I have an issue with the app I am working on which is caused when one
link/button is clicked while another is link/button is being
processed. We have decided to create functionality which will disable
the links/buttons onClick while others are being clicked.

For most cases this is quite easy. We are setting a flag which blocks
future clicks while processing is happening. On the load of the page,
this flag is reset and the cycle repeats.

We have a few instances where the page does not reload. It is
submitted but does not refresh. This causes the flag to never get
reset. Currently this process will check and lock a flag, submit the
entry (not refreshing), and then unlock the flag. The problem is that
the submit spawns a server side thread but continues processing the
javascript unlock without waiting for the submit to finish
processing. After thinking through this, our javascript knowledge is
coming up with a blank.

Does anybody know of a proper solution for how javascript or AJAX
would complete this issue?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,994
Messages
2,570,223
Members
46,810
Latest member
Kassie0918

Latest Threads

Top