Page is a not externally linkable
- WebmasterWorld
-- New To Web Development
---- How to have images on javascript that's not random


granddeluxe - 8:44 am on Jan 24, 2010 (gmt 0)


Hi Rockinbil,

sorry..didn't realize i put the links there..i cant edit it back..bummer..

anyway thanks for the reply..but i dont know where to put that script you just gave me..

did u mean that i have to delete the:

var xy=Math.floor(Math.random()*ad.length);

document.write('<a href="'+links[xy]+'" target="_blank"><img src="'+ad[xy]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'" border="0"></a>');
// End -->

and change it to your new script:
for (i=0;i<ad.length;i++) {
document.write('<a href="'+links[i]+
'" target="_blank"><img src="'+ad[i]+
'" width="'+img_width+'" height="'+img_height+
'" alt="'+img_title+'" border="0"></a>');
}

is this correct?


Thread source:: http://www.webmasterworld.com/new_web_development/4066561.htm
Brought to you by WebmasterWorld: http://www.webmasterworld.com