hi,
you could use <symbol> and <use>. the symbol holds the entire pump.
imagine the pump is defined only by strokes that cannot hold fills.
therein you have your donut that could hold a fill but has the default
green. then you could call pump1 as <use xlink:href="pumpSymbol"
fill="green" id=pump1"/>. with
document.getElementById('pump1').setAttributeNS(null,'fill','blue') you
could fill your pumps the way you do now. note that you have to take
care about the way your base pump is graphicaly definded in order to not
get filled stuff you don't want to.
andr�
satnut28 wrote:
>Hi All,
>
>I've created an SVG file called pump.svg. I am controlling the fill
>color of the pump when the value in the "Red" or "blue" form box is
>changed. What I need to do is change the fill color of the first
>pump, when I change the value in the first form box (RED), and
>change the fill color of the secong pump when the value in
>the "blue" form box is changed. Essentially I would like to create
>one svg file, and make multiple copies of it for display on my
>page. Through javascript I will change different atributes of the
>pumps based on field conditions. My problem is how can the image
>file be indexed in such a way as to control individual copies of the
>image??
>
>The code can be viewd here.
>http://www3.sympatico.ca/sylvie1313/SVG/liqso2.htm
>
>Any Help would be appreciated.
>
>Norm
>
>
>
>
>-----
>To unsubscribe send a message to: [EMAIL PROTECTED]
>-or-
>visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
>----
>Yahoo! Groups Links
>
>
>
>
>
>
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
$9.95 domain names from Yahoo!. Register anything.
http://us.click.yahoo.com/J8kdrA/y20IAA/yQLSAA/1U_rlB/TM
--------------------------------------------------------------------~->
-----
To unsubscribe send a message to: [EMAIL PROTECTED]
-or-
visit http://groups.yahoo.com/group/svg-developers and click "edit my membership"
----
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/svg-developers/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/