does document.getElementId("MyElementId") work?

Dear sir,

I try to use the following code to get the reference
of an element in a svg file, but always get the null
result. Could you give me a tip?

<svg width="100" height="100">
  <defs><script><![CDATA[
    function MouseClickHandler() {
      var obj;
        obj = document.getElementById('MyElement');
        if (obj == null)
          alert("Obj is a null!");
        else
          obj.setAttribute('r', '20'); 
        }
  ]]></script>
  </defs>
  <circle id="MyElement" cx="50" cy="50" 
onclick="MouseClickHandler()" r="10"/>
</svg>

I run it with IE5 and adobe svg viewer.

Thank you in advance!

W P

__________________________________________________
Do You Yahoo!?
Yahoo! Photos - 35mm Quality Prints, Now Get 15 Free!
http://photos.yahoo.com/

Received on Sunday, 1 October 2000 16:44:52 UTC