I have the following SVG file. Unfortunately it only works in ASV. What is the proper cross browser way of doing the same?
Michael <?xml version="1.0" encoding="utf-8" ?> <!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd"> <svg onload="init(evt)" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="-20 -20 40 40" width="600" height="600"> <title>Flower Power</title> <desc></desc> <style type="text/css"> <![CDATA[ ]]> </style> <script type="text/ecmascript"> <![CDATA[ var SVGObj var a = 1.2; var b_max = 15; var theta_inc = 30; var theta_max = 360 / theta_inc; function init(evt) { SVGObj = evt.target.ownerDocument plot_dots() } function plot_dots() { var contents_group = SVGObj.getElementById('contents'); for (var b_count = 1; b_count <= b_max; b_count++) { var circle_radius = Math.pow(a, b_count); var dot_radius = circle_radius * Math.PI / 24; for (var theta_count = 0; theta_count < theta_max; theta_count++) { var dot_angle = theta_count * theta_inc + theta_inc/2 * (b_count % 2); var dot_x = circle_radius * Math.cos(dot_angle/360 * 2 * Math.PI); var dot_y = circle_radius * Math.sin(dot_angle/360 * 2 * Math.PI); var new_dot = SVGObj.createElement('circle') new_dot.setAttribute('cx', dot_x) new_dot.setAttribute('cy', dot_y) new_dot.setAttribute('r', dot_radius) new_dot.setAttribute('style', 'fill:green;') contents_group.appendChild(new_dot) } } } ]]> </script> <g id="contents"></g> </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/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/svg-developers/join (Yahoo! ID required) <*> To change settings via email: [email protected] [email protected] <*> 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/

