473,395 Members | 1,468 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

select list

I need to have tooltips in a select list (or combo ), are there some
examples ?

--
Questa è una firma automatica di MesNews.
Sito: http://www.mesnews.net
Jul 30 '05 #1
3 1495
Ayrton <al***********@libero.it> wrote in message news:mn***********************@libero.it...
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'>&nbsp;</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='&nbsp;';};
}

</SCRIPT>
</BODY>
</HTML>

--
Stephen Chalmers
Jul 31 '05 #2
Sembra che Stephen Chalmers abbia detto :
Ayrton <al***********@libero.it> wrote in message
news:mn***********************@libero.it...
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'>&nbsp;</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='&nbsp;';};
}

</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
Aug 1 '05 #3
Ayrton <al***********@libero.it> wrote in message news:mn***********************@libero.it...

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


Which is quite consistent with what I said.
--
Stephen Chalmers
Aug 1 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Jan | last post by:
I store sql-commands in a database table. In the first step I get the sql command out of the database table with embedded sql. In the second step I try to execute the command, which i got from the...
3
by: Stewart | last post by:
Dear comp.lang.javascript, I have more than once wanted to manipulate the contents of select boxes dynamically, whilst the boxes contain <optgroup> tags. Manipulation of a select box containing...
5
by: callmebill | last post by:
I'm relatively new to javascript, and I'm trying to decide whether the following (and if so, clues on how to do it): I'd like to create two HTML multiple-select boxes. The first would be a list...
19
by: William Wisnieski | last post by:
Hello Everyone, I have a main form with a datasheet subform that I use to query by form. After the user selects two criteria on the main form and clicks the cmdShowResults button on the main...
2
by: Chris Plowman | last post by:
Hi all, I was wondering if anyone can help me with a really annoying problem I have been having. I made a derived datagrid class that will select the row when a user clicks anywhere on a cell...
4
by: Ian Richardson | last post by:
Hi, The function I've put together below is a rough idea to extend a SELECT list, starting from: <body> <form name="bambam"> <select id="fred"> <option value="1">1</option> <option...
7
chunk1978
by: chunk1978 | last post by:
hello. so i have 2 select menus which add and remove options from a 3rd select menu... it seems, however, that it's not possible to use different select menus to toggle a 3rd, because when an...
16
by: Richard Maher | last post by:
Hi, I have this Applet-hosted Socket connection to my server and in an ONevent/function I am retrieving all these lovely rows from the server and inserting them into the Select-List. (The on...
4
by: rn5a | last post by:
A Form has 2 select lists. The 1st one whose size is 5 (meaning 5 options are shown at any given time) allows multiple selection whereas the 2nd one allows only 1 option to be selected at a time. ...
1
by: Sunray | last post by:
I have a form called the sales form and i have 2 sets of listboxes So what happens is. i add items form the bottom set of list boxes which are bound to a data base to the top set of list boxes which...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.