Free Advertising - Tesco - Credit Cards - Loans - NJ CoLocation

PDA

View Full Version : See img with the link made in JavaScript ...


JK Net
Feb 1st 2008, 7:34 am
Hello,

How can I create a link to an image with javascript?


I wanted to make something like:

<img src="java script:xxx('$dtl_imagepath'$arr_picSrc)">


How can I do?


Thanks

nelse
Feb 1st 2008, 4:20 pm
You have to generate all <img> tag in javascript.

JK Net
Feb 4th 2008, 3:09 am
You have to generate all <img> tag in javascript.


Why? :confused:

locdev
Feb 4th 2008, 6:39 am
I think you can try this way:

<img src="t.gif" id="img1" />
<script>img1.src=xxx('$dtl_imagepath'$arr_picSrc);</script>


t.gif is 1x1px point image