What is this doing that is incorrect? Are you using the same tag more than once on a page and expecting a different random number?
 
Regards,
Mike


From: listdad@webstandardsgroup.org [mailto:[EMAIL PROTECTED] On Behalf Of nishak
Sent: Tuesday, August 08, 2006 8:07 AM
To: wsg@webstandardsgroup.org
Subject: [WSG]

 

 

Hi All,

 

I want to add the src of img tag dymanically, which I m building in my js file.

<script>document.write("<img src="" width=\"475\" height=\"137\"");</script>

 

but this code has some bug.

Can anyone suggest me any thing else

 

I have even tried macro but its not working

<img src="" width="137" height="39" /></td>

 

 

js file

 

var randomnumber=Math.floor(Math.random()*3);

var imageName2="./images/banners/banner"+randomnumber+"-2"+ ".jpg";

 

 

Thanks in advance.

Nisha

 


******************************************************
The discussion list for http://webstandardsgroup.org/

See http://webstandardsgroup.org/mail/guidelines.cfm
for some hints on posting to the list & getting help
******************************************************

Reply via email to