PDA

View Full Version : A question about click and double-click



Tohaki
11-10-2008, 01:31 PM
I have noticed that when you double-click then both the JavaScript for click and double-click is run. Is there any way to avoid or "fix" this?

jscheuer1
11-10-2008, 08:50 PM
Different browsers look at this differently. IE can be made to ignore the click when there is a dblclick. I don't think FF can, or if it can, I haven't figured out how.

magicyte
11-10-2008, 10:32 PM
When you make a click, no matter what, it will count (using IE). If you click again right after the first click, a double click will count. You see, if you double click, you will click. I don't think there is a way to fix this. It may also depend on the reflexes of the user...

-magicyte

jscheuer1
11-11-2008, 03:31 AM
A setTimeout may be employed in IE to override this. But, as I say, other browsers vary. There may be a way to employ event capturing vs. event bubbling (or some other approach) in these other browsers to get the desired result, but then again, perhaps not.

Before I go into extensive testing on that account, I'd like a better idea of just exactly what you are trying to accomplish. Please give specifics. There may be a simpler way to get the functionality you require, if you spell out the details.

Please post a link to the page on your site that contains the problematic code so we can check it out.

Tohaki
11-17-2008, 07:58 AM
A setTimeout may be employed in IE to override this.How would I go about doing this?


Before I go into extensive testing on that account, I'd like a better idea of just exactly what you are trying to accomplish. Please give specifics. There may be a simpler way to get the functionality you require, if you spell out the details.In short I use click to trigger a hidden button in a data table that shows more details of the row object in a side view, and double click to trigger another button that takes the selected object and navigates to another page. A double submit like this seems to create a non-fatal error, which I only notice in the log.


Please post a link to the page on your site that contains the problematic code so we can check it out.I'm afraid it is not up and running yet.