Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > TECHNICAL DISCUSSIONS > JAVA Technologies
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 22-11-07, 04:33 PM   #1 (permalink)
Member
 
ananthkolli's Avatar
 
Join Date: Apr 2007
Location: Right now in Chennai
Posts: 30
Thanks: 5
Thanked 5 Times in 3 Posts
Thanks: 5
Thanked 5 Times in 3 Posts
Rep Power: 2 ananthkolli is on a distinguished road
how to display tooltip for each item in multiselect box

Hi,

We have very long description for each field in multi select box., the box is not wide enough to see the full description. Is there any way to display a tooltip message when I put my mouse over the field.

thanx in advance...

Regards
Ananth
ananthkolli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-11-07, 05:47 PM   #2 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: how to display tooltip for each item in multiselect box

which Java technology you are using? is it desktop application or web based application?
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-11-07, 06:12 PM   #3 (permalink)
Member
 
ananthkolli's Avatar
 
Join Date: Apr 2007
Location: Right now in Chennai
Posts: 30
Thanks: 5
Thanked 5 Times in 3 Posts
Thanks: 5
Thanked 5 Times in 3 Posts
Rep Power: 2 ananthkolli is on a distinguished road
Re: how to display tooltip for each item in multiselect box

hi kireeti,

this is the web based application and i am using struts.

regards,
Ananth
ananthkolli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-11-07, 07:01 PM   #4 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: how to display tooltip for each item in multiselect box

You can try out overlib free javascript to do it along with onMouseOver and onMouseOut evens for option tags...

If you can't figure out how to use overlib javascript code.... let me know, I will provide a simple code for you which is very simple but with limited functionality....

Thanks,
Krishna
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-11-07, 07:07 PM   #5 (permalink)
Member
 
ananthkolli's Avatar
 
Join Date: Apr 2007
Location: Right now in Chennai
Posts: 30
Thanks: 5
Thanked 5 Times in 3 Posts
Thanks: 5
Thanked 5 Times in 3 Posts
Rep Power: 2 ananthkolli is on a distinguished road
Re: how to display tooltip for each item in multiselect box

Hi kireeti,

i tried overlib.js, but the thing is option tag not responding for onmouseover event or other events. it is working fine for other elements.

Thanks & Regards,
Ananth
ananthkolli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-11-07, 08:34 PM   #6 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: how to display tooltip for each item in multiselect box

Ananth,

hmm... I am seeing that this is not supported IE. But Firefox (Netscape should also support) supports this event.


Looking around for solution. But right now I can give you a work around which I have developed for my project....

Download attachment and follow instructions

NOTE -
1. Rename the file to .html
2. Open the page in firefox or netscape
3. enter some text in filter criteria box and clear it to see complete list of values in select box (it is just a piece of sample code and this behavior is a bug!!!! don't mind)
4. Now change your selection in first select box.... related description will be shown in the below place provided.
5. Just place your mouse over an option in select list box... it displays a tool tip automatically (uses an attribute called "title" in options... doesn't work in IE)

Thanks,
Krishna
Attached Files
File Type: txt Search Fields.txt (1.7 KB, 15 views)
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 22-11-07, 09:34 PM   #7 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: how to display tooltip for each item in multiselect box

Some more info on MS specific events can be found here...
Welcome to the MSDN Library
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 23-11-07, 12:29 PM   #8 (permalink)
Member
 
ananthkolli's Avatar
 
Join Date: Apr 2007
Location: Right now in Chennai
Posts: 30
Thanks: 5
Thanked 5 Times in 3 Posts
Thanks: 5
Thanked 5 Times in 3 Posts
Rep Power: 2 ananthkolli is on a distinguished road
Re: how to display tooltip for each item in multiselect box

thanks for ur prompt reply, i am using titile attribute in option tag to display tooltip, it is working fine with FireFox. but it has to work in IE also... mean while i wil try some other options... if u find any other solution,please let me know...

Regards ,
Ananth
ananthkolli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 23-11-07, 02:58 PM   #9 (permalink)
Super Moderator
 
sk_kireeti's Avatar
 
Join Date: Feb 2006
Location: Hyderabad
Posts: 2,355
Thanks: 117
Thanked 241 Times in 198 Posts
Thanks: 117
Thanked 241 Times in 198 Posts
Blog Entries: 4
Rep Power: 51 sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute sk_kireeti has a reputation beyond repute
Re: how to display tooltip for each item in multiselect box

Ananth,

I am not sure about your requirements and pay lay out... but if you want a solution common to all platforms, I will suggest you to go for custom components (javascript based). You can create a select option look-alike by writing wrappers around "autofill" scripts which you can download from any site. Otherwise, there is not direct solution for this if you want to use only select option elements.

Thanks,
Krishna
__________________
Give 1 cup rice to a hungry Indian just by a mouse click. No money, no form filling, no hassle... Click here for the donation.
sk_kireeti is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
The Following User Says Thank You to sk_kireeti For This Useful Post:
ananthkolli (26-11-07)
Old 22-01-08, 08:09 PM   #10 (permalink)
Member
 
ananthkolli's Avatar
 
Join Date: Apr 2007
Location: Right now in Chennai
Posts: 30
Thanks: 5
Thanked 5 Times in 3 Posts
Thanks: 5
Thanked 5 Times in 3 Posts
Rep Power: 2 ananthkolli is on a distinguished road
Re: how to display tooltip for each item in multiselect box

Hi,

we can provide the horizantal scroll bar using the div tag, for more details find the attachement.

Thanks & Regards
Ananth
Attached Files
File Type: txt WithHorizontalScrollbar.txt (4.5 KB, 11 views)
ananthkolli is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29-01-08, 06:25 PM   #11 (permalink)
Moderator
 
t_mohan's Avatar
 
Join Date: Apr 2006
Location: India
Posts: 636
Thanks: 57
Thanked 78 Times in 63 Posts
Thanks: 57
Thanked 78 Times in 63 Posts
Rep Power: 17 t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold
Re: how to display tooltip for each item in multiselect box

Hello ananth and kireeti,

I think the discussion started somewhere and ended up some where , If im not wrong
Ananth, here is the answer for your question,

Simply add an attribute called as "title"
Let me show you an example
< textarea name="someName" title= "this is a title" > Some long texttttt < /title >

If u are using some JSP scriptlets to display your text
this is how ur code should look like
< textarea name="someName" title= " < % =someLongText % >" >< % = SomeStrippedTextVariable% > < /textarea >

On mouse over it automatically shows the long text

Let me know your questions

Thank You
__________________
M0h@n
t_mohan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29-01-08, 06:28 PM   #12 (permalink)
Moderator
 
t_mohan's Avatar
 
Join Date: Apr 2006
Location: India
Posts: 636
Thanks: 57
Thanked 78 Times in 63 Posts
Thanks: 57
Thanked 78 Times in 63 Posts
Rep Power: 17 t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold
Re: how to display tooltip for each item in multiselect box

On mouse over it automatically shows the long text
__________________
M0h@n
t_mohan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 29-01-08, 06:28 PM   #13 (permalink)
Moderator
 
t_mohan's Avatar
 
Join Date: Apr 2006
Location: India
Posts: 636
Thanks: 57
Thanked 78 Times in 63 Posts
Thanks: 57
Thanked 78 Times in 63 Posts
Rep Power: 17 t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold t_mohan is a splendid one to behold
Re: how to display tooltip for each item in multiselect box

Please correct me if im wrong
__________________
M0h@n
t_mohan is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in Technorati