hi every one 

i am trying to write a javascript function that would allow onclick 
event to move the circle upwords 

the svg document below has a problem , which i could not figure out 
was it therfore the onclick event dosn't do any thing 

could any one help me with this problem and thanks in advance 






<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 20010904//EN"
"http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd";>
<svg id="SVG" width="" height="" onload="Initialize(evt)">





<script type="text/javascript">
<![CDATA[
var SVGRoot;
var SVGDoc;
var cyy; 
var cxx;
var change;
var height;


 
function Initialize(evt){
SVGDoc = evt.getTarget().getOwnerDocument();  
SVGRoot = SVGDoc.getElementById("to-be-updated");
height= SVGRoot.getAttribute("height");
 
}

function Up(value){
    cyy = SVGRoot.getAttribute('y');
    change = height*value; 
    SVGRoot.setAttribute('y', cyy - change);
}

]]>
</script>
<text x="455" y="55" style="font-size:l6px; font-weight:bold;  " 
onclick="Up(-10)">click to move the circle up</text>
<circle id="to-be-updated" cx="200" cy="400" r="80"  style="font-
size:l4px ;stroke:black"  />
 </svg>





-----
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/
 



Reply via email to