| Author |
Dblclick and Click event handlers not invoked - used jQuery
|
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 488
|
|
Hello,
I have implemented an UI based on jQuery event handlers that moves the OPTIONs between two HTML SELECT boxes.
It works great and fine but there is an issue that I have observed.
When the page comes up the double clicking on OPTION does not move the item to another HTML select. After that second double click onwards it starts responding and moving the OPTION items between the two lists.
I have written a JS function to move the items between two list and binding it to the double click event in document.ready() event.
Here is the JS Function that I have implemented. Trying to comment appropriately.
Thanks once again,
Amit
|
Regards,
Amit
|
 |
Eric Pascarello
author
Rancher
Joined: Nov 08, 2001
Posts: 15357
|
|
option elements do not support click events in all browsers.
Eric
|
 |
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 488
|
|
Hello,
Thanks for your reply.
I am attaching the click and double click events to the HTML Select boxes.
The code posted wrongly shows OPTION elements alone. It has SELECT as well surrounding it.
I will update the code posted accordingly.
It does not work for the first time when HTML is loaded and thereafter it works fine.
Regards,
Amit
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56173
|
|
|
You'll need to post the relevant HTML fragments.
|
[Smart Questions] [JSP FAQ] [Books by Bear] [Bear's FrontMan] [About Bear]
|
 |
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 488
|
|
Hi Bear,
Thanks for your reply.
I am attaching a zip file (demo.zip) that has the cut-down version of what I am doing.
It took me a while to remove other things from the HTML so bit late in posting relevant HTML code.
I have one observation here though,
1) The same code works fine i.e. right from the first double click on SELECT box in FF 3.X
2) In IE 7 , browser asks us to allow the blocked content (which is related to restriction on Webpage from running Scripts/Active X controls etc etc.). After I do "Allow Blocked Content" , page loads and then does not respond to the first double click event. It happens with the buttons as well (These buttons are not part of the demo.html).
Below is the code for the demo.html ( I could not attach the file to this message).It depends on "jquery-1.3.2.min.js".
Thanks in advance,
Amit
|
 |
Bear Bibeault
Author and ninkuma
Marshal
Joined: Jan 10, 2002
Posts: 56173
|
|
|
Sorry, but if this is an IE-only problem, I don't have a Windows installation currently that I can test upon.
|
 |
amit punekar
Ranch Hand
Joined: May 14, 2004
Posts: 488
|
|
Hi Bear,
Thanks anyways. Never mind. I will certainly post if I can overcome this issue.
Regards,
Amit
|
 |
 |
|
|
subject: Dblclick and Click event handlers not invoked - used jQuery
|
|
|