Sembra che Stephen Chalmers abbia detto :
> Ayrton <> wrote in message
> news:...
>> I need to have tooltips in a select list (or combo ), are there some
>> examples ?
>
> None that I could find, other than by simulating a select box in CSS.
> The following works in the Mozilla family only. In I.E. and Opera I could
> not add mouseover events successfully to the option elements. Perhaps
> someone else can.
>
> <HTML>
> <BODY>
>
> <DIV ID='optionTip'> </DIV><BR>
>
> <FORM name='f1'>
> <SELECT name='actions'>
> <OPTION value='moon'>Moon</OPTION>
> <OPTION value='earth'>Earth</OPTION>
> <OPTION value='mercury'>Mercury</OPTION>
> </SELECT>
> </FORM>
>
> <SCRIPT type="text/javascript">
> var optionHelp=['Pull the Moon out of orbit',
> 'Collide the Earth with Mars',
> 'Collide Mercury with Venus' ];
>
> if(document.forms.f1.innerHTML)
> with(document.forms.f1)
> for(var i=0; i<actions.length; i++)
> {
> actions.options[i].onmouseover=new
> Function("document.getElementById('optionTip').inn erHTML=optionHelp["+i+"];");
>
> actions.options[i].onmouseout=function(){document.getElementById('op tionTip').innerHTML=' ';};
> }
>
> </SCRIPT>
> </BODY>
> </HTML>
I've try your example, but the event mouseover don't fire when the
mouse il over an item of select.
My browser is IE 6.0
--
Questa è una firma automatica di MesNews.
Sito:
http://www.mesnews.net