XML Elves

XML Elves

<community>of XML and SVG Developers</community>


Need SVG to cause text box to pop up on mouse over

This is a discussion on Need SVG to cause text box to pop up on mouse over within the SVG Questions forums, part of the SVG Forums category; Hi. Thanks in advance for any guidance you can provide. I'm looking for examples of SVG code to cause a ...


Go Back   XML Elves > SVG Forums > SVG Questions

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

Notices


Click here to register

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 05-26-2005, 10:37 AM
Junior Member
 
Join Date: May 2005
Posts: 2
Default Need SVG to cause text box to pop up on mouse over

Hi. Thanks in advance for any guidance you can provide. I'm looking for examples of SVG code to cause a test box to pop up when a user's mouse pointer hovers over an object. For example, when a user hovers her mouse pointer over a bar in a bar chart, the user sees a text box pop up with details about the data for that particular bar.
__________________
VG is great
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 05-26-2005, 12:16 PM
Anonymous
Guest
 
Posts: n/a
Default Need SVG to cause text box to pop up on mouse over

You can
1) define your text box with visibility="hidden" as
<g id="tooltip" transform="translate(0 0)">
<rect ................
<text id="tooltip_data ...............
</g>

2) For your objects, define event ( for your bars by example)
<rect onmouseover="show_tooltip('some text',40,200)" onmouseout="hide_tooltip()" .... />

3) Define functions
function show_tooltip(data,x_pos,y_pos)
{
svgdoc.getElementById("tooltip").setAttribute("tra nsform","translate(" + x_pos.toString() + " " + y_pos.toString() + ")")
svgdoc.getElementById("tooltip_data").firstChild.d ata = data
svgdoc.getElementById("tooltip").setAttribute("vis ibility","visible")
}

function hide_tooltip()
{
svgdoc.getElementById("tooltip").setAttribute("vis ibility","hidden")
}

Michel
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 05-26-2005, 09:16 PM
Junior Member
 
Join Date: May 2005
Posts: 2
Default Need SVG to cause text box to pop up on mouse over

Thanks Michel for your prompt reply. I'll give it a try and see what happens.
__________________
VG is great
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
box, mouse, pop, svg, text


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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
Trackbacks are On
Pingbacks are On
Refbacks are On


All times are GMT -6. The time now is 02:07 AM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

Epson Stylus Ink Cartridges...
Check this site out to order Epson Stylus ink cartridges.

computer ink
Looking for good computer ink? We are specialists in printer ink. We provide a massive range of ink cartridges at great prices…

Hard Disk Drive Data Recovery Cheshire
Do you need data recovery done? We will collect your hard disk drive in Cheshire and our success rate is unequalled.

ink cartridges Free UK Delivery on ink cartridges such as Canon, Dell, Epson, hp & Lexmark.

1 2 3 4 5 6 7 8 9 10