The plot thickens - i.e. this seems nuts - even with David's Doctype 
suggestion, I can't determine a cross-browser method of retrieving an attribute 
with a foreign namespace. IE9 seems to use a DOM1 method(1), safari/ff work 
with a method that I wouldn't expect to work (2) while the method that seems to 
be endorsed officially 
(3)(http://www.w3.org/Graphics/SVG/IG/resources/svgprimer.html#getAttribute) 
doesn't seem to work in any of them.

Am I missing something obvious?

<!DOCTYPE html>
<html>
<head>
  <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  <script>
    function doCircle(evt) 
    {
      var theCircle = evt.target;
      var myName=theCircle.getAttribute("fme:COUNT");//1-works in ie9, not ff 
or safari
      //var myName = theCircle.getAttributeNS(null,"fme:COUNT");//2-works in 
safari,ff,but not ie9
      //var myName = 
theCircle.getAttributeNS("http://www.safe.com","fme:COUNT";);//3-works in nothing
      alert(myName);
    }
  </script>
</head>
<body>
  <svg width="300px" height="300px" xmlns:fme="http://www.safe.com";>
    <text x="25" y="50" font-size="24">SVG Circle Element</text>
    <text x="25" y="275">Click the circle to change its size.</text>
    <circle cx="125" fme:COUNT="20" cy="150" r="50" fill="pink" stroke="green" 
stroke-width="5" onclick="doCircle(evt)" />
  </svg>
</body>
</html>



------------------------------------

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

Reply via email to