Go Back   CodingForums.com > :: Client side development > JavaScript programming

Before you post, read our: Rules & Posting Guidelines

Reply
 
Thread Tools Rate Thread
Enjoy an ad free experience by logging in. Not a member yet? Register.
Old 02-03-2011, 03:46 PM   PM User | #1
maria_megha
New Coder

 
Join Date: Dec 2010
Posts: 14
Thanks: 0
Thanked 0 Times in 0 Posts
maria_megha is an unknown quantity at this point
adding a tooltip for each option item in drop down menu

have a scenario where I show a drop-down-with-few-items in a JSP page, to the user.
The length of few options in the drop down is greater than that of the drop down's, hence our requirement is to show the hovered (not selected) option as tooltip for user's convenience. I cannot use the title attribute option as its not compatible with my web browser
maria_megha is offline   Reply With Quote
Old 02-03-2011, 04:52 PM   PM User | #2
Philip M
Supreme Master coder!

 
Philip M's Avatar
 
Join Date: Jun 2002
Location: London, England
Posts: 17,037
Thanks: 197
Thanked 2,411 Times in 2,389 Posts
Philip M has a spectacular aura aboutPhilip M has a spectacular aura aboutPhilip M has a spectacular aura about
Double-posted at http://forums.89.biz/forums/javascri...ropdown+option


A few browsers support title in the options list, but most do not. They also do not support mouseover events. If you want to do this, you basically have to code your own select element out of divs, and lists, and links.

Google for more info.


All advice is supplied packaged by intellectual weight, and not by volume. Contents may settle slightly in transit.
Philip M is online now   Reply With Quote
Old 02-04-2011, 01:02 AM   PM User | #3
Krupski
Regular Coder

 
Krupski's Avatar
 
Join Date: Dec 2010
Location: United States of America
Posts: 502
Thanks: 39
Thanked 47 Times in 46 Posts
Krupski is on a distinguished road
Quote:
Originally Posted by maria_megha View Post
have a scenario where I show a drop-down-with-few-items in a JSP page, to the user.
The length of few options in the drop down is greater than that of the drop down's, hence our requirement is to show the hovered (not selected) option as tooltip for user's convenience. I cannot use the title attribute option as its not compatible with my web browser
Why not just make the select drop-down wider?

And, if you're having problems with things not working, you are probably using MSIE.

Fortunately, there is a nice, clean and simple fix for MSIE not supporting hover... check here:

http://www.xs4all.nl/~peterned/csshover.html

It's one little file you stick in your CSS and bingo! Hover works in MSIE.
__________________
"Anything that is complex is not useful and anything that is useful is simple. This has been my whole life's motto." -- Mikhail T. Kalashnikov
Krupski is offline   Reply With Quote
Reply

Bookmarks

Tags
javascript, jsp

Jump To Top of Thread


Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 12:56 PM.


Advertisement
Log in to turn off these ads.