Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Dblclick and Click event handlers not invoked - used jQuery

 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Eric Pascarello
author
Rancher
Posts: 15385
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
option elements do not support click events in all browsers.

Eric
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You'll need to post the relevant HTML fragments.
 
amit punekar
Ranch Hand
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 64858
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 544
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Bear,
Thanks anyways. Never mind. I will certainly post if I can overcome this issue.

Regards,
Amit
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic