aspose file tools*
The moose likes HTML, CSS and JavaScript and the fly likes 'title' attribute in Select box in relation to tooltip display Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark " Watch " New topic
Author

'title' attribute in Select box in relation to tooltip display

Harsha Jay
Greenhorn

Joined: Sep 25, 2001
Posts: 14
For the snippet below
<select id="something" name="something">
<option value="1">This is option 1</option>
<option value="2">This is option 2</option>
<option value="3">This is option 3</option>
<option value="4">This is option 4</option>
<option value="5">This is option 5</option>
</select>

can I iterate over the <option> elements and is it possible to add 'title' attribute? I am doing this so that I can get tooltips to show up.

Or

Is there a easier way of achieving the tooltip display?

much appreciated!
H
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61202
    
  66

What happened when you tried it?


[Asking smart questions] [Bear's FrontMan] [About Bear] [Books by Bear]
Harsha Jay
Greenhorn

Joined: Sep 25, 2001
Posts: 14
Alright got it to work.

I was getting this list from enums.. so, i had to bind it in the JSP.

time well spent!
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61202
    
  66

Be aware that it may not work in all browsers.
Harsha Jay
Greenhorn

Joined: Sep 25, 2001
Posts: 14
Our tech stack dictates IE 7.0 I'm covered. I love firefox though.
Bear Bibeault
Author and ninkuma
Marshal

Joined: Jan 10, 2002
Posts: 61202
    
  66

It also appears to work in Firefox but not Opera or Safari, which is not surprising as it is non-standard.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 'title' attribute in Select box in relation to tooltip display