I can think of a few ways to deal with it:

1) Disallow double-clicking on the client, ever.  Add

        ondblclick="javascript: return false;"

to the anchor tag(s).  (The servlet engine never knows whether the user
single- or double-clicked.  If you need that specific information, you
always need to deal with it on the client side.)

2) If you want to allow double-clicking to run the action twice, but you
don't want both clicks running at the same time, synchronize on a session
attribute.

3) If you want to disallow ever running the action twice in a row, set some
session attribute to remember the last action you ran, and reject any action
which matches the last action run.

                                        -- Bill K. 

> -----Original Message-----
> From: Wang, Jianming [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, July 18, 2001 8:58 AM
> To: '[EMAIL PROTECTED]'
> Subject: Double Click
> 
> 
> Hi,  
> 
> I have an hyperlink, when user click on it, it will update 
> the database.  My
> question is how can I deal with the case when user double 
> click on the link?
> Thank you in advance for your help.
> 
> JW.
> 

Reply via email to