Results 1 to 5 of 5

Thread: A question about click and double-click

  1. #1
    Join Date
    Aug 2008
    Location
    Western Europe
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default A question about click and double-click

    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?

  2. #2
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  3. #3
    Join Date
    Jun 2008
    Posts
    589
    Thanks
    13
    Thanked 54 Times in 54 Posts
    Blog Entries
    1

    Default

    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

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    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.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. The Following User Says Thank You to jscheuer1 For This Useful Post:

    Tohaki (11-17-2008)

  6. #5
    Join Date
    Aug 2008
    Location
    Western Europe
    Posts
    17
    Thanks
    4
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    A setTimeout may be employed in IE to override this.
    How would I go about doing this?

    Quote Originally Posted by jscheuer1 View Post
    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.

    Quote Originally Posted by jscheuer1 View Post
    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.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •