Try this:
img.setAttributeNS("http://www.w3.org/1999/xlink","href";, "image2.jpg");
_
From: kelumsvg [mailto:[EMAIL PROTECTED]
Sent: Monday, September 13, 2004 8:19 PM
To: [EMAIL PROTECTED]
Subject: [svg-developers] dynamic images
hi,
i
Hi,
> //image1.
> jpg
> img=svgdoc.getElementById("img")
> img.setAttributeNS(null,'xlink:href','image2.jpg');
You need to set the namespace, it can't be null.
eg:
img.setAttributeNS('http://www.w3.org/1999/xlink','xlink:href','image2.jpg');
Regards
Tonny Kohar
--
Sketsa
SVG Grap
hi,
xlink is not the svg namespace. try
img.setAttributeNS('http://www.w3.org/1999/xlink','xlink:href','image2.jpg');
andré
kelumsvg schrieb:
> hi,
> i have embedded image in my svg file.the coding is like follows
>
> //image1.
> jpg
>
> when i click a button i want to change
hi,
i have embedded image in my svg file.the coding is like follows
//image1.
jpg
when i click a button i want to change that image to image2.jpg
for that i used.
img=svgdoc.getElementById("img")
img.setAttributeNS(null,'xlink:href','image2.jpg');
this does not give errors.bu
4 matches
Mail list logo