I am not expecting a different random number in same page.
Anyways the problem is solved with the combination of single and double
quotes.

Thanks a lot.

 

-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED]On Behalf Of [EMAIL PROTECTED]
Sent: Tuesday, August 08, 2006 4:23 PM
To: [email protected]
Subject: RE: [WSG]

 

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: [email protected] [mailto:[EMAIL PROTECTED] On Behalf Of nishak
Sent: Tuesday, August 08, 2006 8:07 AM
To: [email protected]
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="" imageName2};" 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
******************************************************
******************************************************
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