View Single Post

  #5 (permalink)  
Old 06-08-2005, 08:15 AM
Bruno
Guest
 
Posts: n/a
Default <svg:svg> versus <svg>

I have the same problem, but I can't use a svg file because the content is result of a processing in php, like the next example. What can I do in order this script works?

<html xmlns:svg= "http://www.w3.org/2000/svg">
<object id="AdobeSVG" CLASSID= "clsid:78156a80-c6a1-4bbf-8e6a-3cd390eeb4e2"></object>
<? echo '<?import namespace="svg" implementation="#AdobeSVG"?>';

... (html tags)

<svg:svg width="400px" height="400px" viewBox="-75 -35 45 40" xmlns:svg="http://www.w3.org/2000/svg"">
<svg:script type="text/ecmascript"><![CDATA[
function MouseOver(evt) {
evt.target.setAttribute("fill","none");
}
function MouseOut(evt) {
evt.target.setAttribute("fill","blue");
}
]]></svg:script>
<?

... (php processing obtain $varPath)

echo '<svgath id="test" name="test" onmouseover="MouseOver(test');" onmouseout="MouseOut(test');" fill="blue" d=" ' . $varPath . ' " />

?>

</svg:svg>

thanks,
Bruno.
Reply With Quote