onmouseover in option

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • levtannen
    New Member
    • Oct 2008
    • 2

    onmouseover in option

    Hello everybody,
    I want to use the onmouseover commentd inside the option tag.

    [HTML]<select name="select" size="4" style="font-family: tahoma;font-size:8pt;" multiple >
    <option onmouseover="pr ocess();" onmouseout="ret urn clear();" value="some value">
    some text
    </option>
    </select>[/HTML]

    It works with FireFox, but does not work with IE and with Google Chrome. Do you know why. Is there any work around?

    Thank you,
    Lev Tannen
    Last edited by gits; Oct 30 '08, 10:37 PM. Reason: added code tags
  • zaphod42
    New Member
    • Oct 2008
    • 55

    #2
    The answer is in this link..... Google Search for html onmouseover....notice how it's spelled

    Comment

    • Rsmastermind
      New Member
      • Sep 2008
      • 93

      #3
      Sorry But I really do not understand the meaning of the line "onmouseove r commentd " What you want to do? is not telling your code instead that you want to use the events onmouseover and onmouseout.

      Basically these are two events on which you can call your functions but what is inside that function that we have to look .As these two handlers are supported by every browser so this is not the case of the your problem better you should post the code of the function "process".

      Comment

      • zaphod42
        New Member
        • Oct 2008
        • 55

        #4
        the problem is in the case of the characters he is using in his html tag....regardle ss of how his functions work, onmouseover is supposed to be "onMouseOve r" inside of html tags

        Comment

        • acoder
          Recognized Expert MVP
          • Nov 2006
          • 16032

          #5
          No, it would work fine as onmouseover too. The problem is that IE doesn't support these events for options. In fact, options are regarded as part of a select and not elements in their own right. I'm not sure about Chrome though.

          Comment

          • Rsmastermind
            New Member
            • Sep 2008
            • 93

            #6
            Originally posted by zaphod42
            the problem is in the case of the characters he is using in his html tag....regardle ss of how his functions work, onmouseover is supposed to be "onMouseOve r" inside of html tags
            Can you please tell me where you have found that the event onmouseover is not getting fired instead of onMouseOver event.The solution reason given by the acoder is correct.

            Comment

            • levtannen
              New Member
              • Oct 2008
              • 2

              #7
              Originally posted by acoder
              No, it would work fine as onmouseover too. The problem is that IE doesn't support these events for options. In fact, options are regarded as part of a select and not elements in their own right. I'm not sure about Chrome though.
              [QUOTE=levtannen]Yes, you are right. But the question remains, is there a way around?

              Comment

              • acoder
                Recognized Expert MVP
                • Nov 2006
                • 16032

                #8
                Firstly, what does process() and clear() do?

                Based on your requirements and forced by browsers failing to recognise options properly, you may have no choice but to go with something like this - a replacement DHTML select.

                Comment

                Working...