Thanks Tonny,

That worked. Namespaces are a pain. Do you know why are there namespaces for
the elements but not the attributes?

Cheers,
Jeremy

> -----Original Message-----
> From: Tonny Kohar [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, 6 April 2004 8:41 PM
> To: [EMAIL PROTECTED]
> Subject: Re: Dynamic modification of the DOM
>
>
> Hi,
>
> >             if (svgDoc != null) {
> >                     if (dirty) {
> >                             Element rect = svgDoc.createElement("rect");
>
> I think above line should be svgDoc.createElementNS(svgNS,"rect");
>
> >                             rect.setAttribute("x", "100");
> >                             rect.setAttribute("y", "100");
> >                             rect.setAttribute("width", "400");
> >                             rect.setAttribute("height", "400");
> >                             rect.setAttribute("fill", "blue");
>
> Same here setAttributeNS(null,"x","100");
> so on
>
> Regards
> Tonny Kohar
> --
> Sketsa
> SVG Graphics Editor
> http://www.kiyut.com
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to