Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    May 2004
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Dropdown and CSS problems with IE. (works with moz)

    Goal: Dropdown ( <select> based) in which tooltips popup as you scroll thru the possible options.

    I have this working in mozilla. I'm using the mouseover and mouseout events to trigger the unhide/hide changes.

    function getID( e ) {
    if (!e) { e = window.event; }
    if (getIE()){
    return e.srcElement.value;
    }
    else {
    return e.originalTarget.value;
    }
    }


    <select onchange="hideAll(event);" onclick="hideAll(event);" onmouseout="hideAll(event);" onmouseover="showPopup(event,'ezcatpop' + getID(event));" id="ezcat" name="ezcat">



    In mozilla it works fine, as I scroll through the various options, the tooltips popup and hide exactly as desired. I'm using event.originalTarget.value as my key to know which <div> to hide/unhide. IE does not have originalTarget, and fromElement refers to <body>. With srcElement, I can only get the selected option, not the currently highlighted option while scrolling. I've tried associating events with the actual <option>'s but they don't seem to fire.

    Any Suggestions?

    Daxbert

  • #2
    Regular Coder
    Join Date
    Feb 2003
    Posts
    638
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Internet Explorer

    I don't see any way to monitor mouse events while over option elements: it seems that they are in a different window than their parent select element --guess that's what "windowed control" means...
    hmm... ?

  • #3
    Supreme Master coder! glenngv's Avatar
    Join Date
    Jun 2002
    Location
    Philippines
    Posts
    11,068
    Thanks
    0
    Thanked 256 Times in 252 Posts
    And you don't even need javascript to make tooltips in option elements in Mozilla. Moz supports title attribute (and onmouseover/onmouseout events for that matter) in the option tag.

    <select title="This is a list of fruits. Please select one.">
    <option value="0" title="This is an apple">Apple</option>
    <option value="1" title="This is an orange">Orange</option>
    <option value="2" title="This is a mango">Mango</option>
    </select>
    Glenn
    ____________________________________

    My Blog
    Tower of Hanoi Android app (FREE!)
    Tower of Hanoi Leaderboard
    Samegame Facebook App
    vBulletin Plugins
    ____________________________________


  •  

    Posting Permissions

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