Re: Color changing elements

Joe,

I think I have an all SVG solution for you....how does that sound :-)

?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC  "-//W3C//DTD SVG 1.0//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> 
<svg        x=             "0"
                y=             "0"
                width=        "200"
                height=       "200">

<rect 	x=	"100" 
	y=	"100" 
	width=	"100" 
	height=	"100"  
	fill=	"green">
	
	<set 	attributeType=	"XML"
		attributeName=	"fill" 
		from=	"green" 
		to=	"red" 
		begin=	"mouseover" 
		end=	"mouseout">

		<desc>	the 'set' element will change the rectangle to red when pointing device 	enters (begin) the 'rect'
                                               .....and when the pointing device leaves(end) the fill will  changed to red :-)
		</desc>
</rect>
</svg>

I think this should do the trick.....let us know how it turns out :-)

We all learn by sharing what we know
Robert A. DiBlasi
www.svgnotebook.com (coming sooner now!)

>>> Joe Bodell <jbodel01@tufts.edu> 12/13/01 05:26PM >>>
Hi all,

This is a really basic question, so I hope I get LOTS of responses :-)

I'm using embedded ASP script to generate an SVG graphic.  There were
two main reasons for this 
1.  Easy database access for grabbing data
2.  I'm not all that familiar with ECMA/Javascript or DOM stuff

Is there a quick and easy way for me to use the onmouseover event
listener  to change the color of an element, say a <rect> element, and
change the color back with onmouseout? Preferably without javascript, or
if anyone knows of some examples I can look at to get the general
idea.....Thanks!

Joe Bodell
__________________________________________
| D560--Decision Support & Visualization |
| Mitre Corporation                      |
| Bedford, MA                            |
------------------------------------------

Received on Thursday, 13 December 2001 20:15:38 UTC