...

View Full Version : Dropdown and CSS problems with IE. (works with moz)



daxbert
05-08-2004, 11:40 AM
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

swmr
05-10-2004, 04:22 AM
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...

glenngv
05-11-2004, 04:49 AM
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>



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum