Jump to content

How Do I Add Href="" To This Code?


amitamberker

Recommended Posts

OK! lets work through link problem, the link is setup like so for example

ImageLink1 = 'http://google.com';

you assign this link address using

document.getElementById('slide_link').setAttribute("href", "ImageLink"+step);

AND you end up with link <a href="http://localhost/ImageLink1"></a> which does NOT show link, but a text ref of variable, now if that's what the op wants, then fine! it works, but I would suggest he requires 'http://google.com' instead, which is what

document.getElementById('slide_link').setAttribute("href", eval("ImageLink"+step));

will produce.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...