Thread: Object Expected
View Single Post

  #1 (permalink)  
Old 03-26-2004, 07:29 AM
radhika radhika is offline
Junior Member
 
Join Date: Mar 2004
Posts: 4
Default Object Expected

Hi,

I have a SVG named "drawing" embedded in my html document.

The following is the javascript code, that is making use of the embedded SVG.

The problem is, I am able to get the value of the attribute represented by "rectangle1" but if I use printNode for that element, it raises an ObjectExpected Error;

function test()
{
SVGDOCUMENT = document.embeds['drawing'].getSVGDocument();
width = SVGDOCUMENT.getElementById("rectangle1").getAttrib ute("width");
res = printNode(SVGDOCUMENT.getElementById("rectangle1") );
}

I tried debugging the above, the values are existing in the element but the printNode is raising an Object Expected exception.

Please help me out, I am not able to proceed further.

Thanks in Advance,
Radhika
Reply With Quote