ondblclick event on an option object won't work in IE

Posted on 2005-04-07
Last Modified: 2009-03-04
Probably easy, but driving me nuts.  I have a select box.  All I want is to have a different ondblclick event for each option.  Here is a section of the select list

<option value="Accuracy" ondblclick="alert(\'Booyah\');">Accuracy</option>
<option value="Adapter" ondblclick="alert(\'Booyah\');">Adapter</option>
<option value="ADC output" ondblclick="alert(\'Booyah\');">ADC output</option>

Works in Firefox.  when I double click the an option it pops up a booyah.  IE nothing.  Frustrating.
Question by:JBarg
    LVL 53

    Expert Comment

    IE does not support any events on the option element.

    LVL 49

    Accepted Solution

    I tested with the code below, although I am not certain offcourse if this is compatible with your intended use of the event:

    <span ondblclick="alert('Booyah');"><option value="Accuracy" />Accuracy</option></span>

    LVL 49

    Expert Comment

    Although tnx to have helped so far; the B indicates that you still have some unclearities on this topic. We could better handle those before closing this thread.

    Expert Comment

    Although I could not make this solution work  as closed, I was able to resolve the problem in a slightly different way.  
    I needed to use the SELECT BOX to submit the form with the identity of my selection.
    I first tried putting the onDblClick="this.form.submit();" into the <OPTION then into <SPAN as suggested here.  At last I put the onDblClick="this.form.submit();"  into the <SELECT statement where it worked perfectly.  When I double click on an option it both selects that option and submits the form.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Join & Write a Comment

    Suggested Solutions

    Foreword (July, 2015) Since I first wrote this article, years ago, a great many more people have begun using the internet.  They are coming online from every part of the globe, learning, reading, shopping and spending money at an ever-increasing ra…
    Things That Drive Us Nuts Have you noticed the use of the reCaptcha feature at EE and other web sites?  It wants you to read and retype something that looks like this.Insanity!  It's not EE's fault - that's just the way reCaptcha works.  But it is …
    In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
    In this tutorial viewers will learn how to embed Flash content in a webpage using HTML5. Ensure your DOCTYPE declaration is set to HTML5: "<!DOCTYPE html>": Use the <object> tag to embed Flash content.: To specify that the object is Flash content, d…

    754 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    20 Experts available now in Live!

    Get 1:1 Help Now