Go Back   Dreamweaver Club Forums > Hand Coders Forum > Javascript and JS frameworks
Register FAQ Members List Search Today's Posts Mark Forums Read

Thread Tools Display Modes
Old 07-23-2009, 01:18 AM   #1
gigiloumill's Avatar
Join Date: Apr 2009
Location: Miami, FL
Posts: 493
Default Banner rotation script help..

Guys, can someone please tell me what I'm doing wrong. When viewed in browser I get a blank page. Thanks

<SCRIPT language=JavaScript>

var img_width = "640";
var img_height = "360";
var img_title = "Click Here";

var links=new Array();
var pic=new Array();

//insert here your images src
pic[0]=<img src="images/IMGA0257.JPG" width="640" height="360" />;
pic[1]=<img src="images/IMGA0264.JPG" width="640" height="360" />;

//insert here your links

var xy=Math.floor(Math.random()*ad.length);//generates a random //digit and then makes it a whole number
document.write('<a href="'+links[0]+'" target="_blank"><img src="'+pic[0]+'" width="'+img_width+'" height="'+img_height+'" alt="'+img_title+'"></a>');
gigiloumill is offline   Reply With Quote
Old 07-23-2009, 02:52 PM   #2
coloeagle's Avatar
Join Date: Sep 2008
Location: Colorado, USA
Posts: 596

Just to clarify,
What type of banner rotating script are you after?
Auto change or single/random image on page load?
The Beauty of CSS (One of my hobbies)
Home Security (My real Job)
Multiple Link Styles with CSS
coloeagle is offline   Reply With Quote

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

All times are GMT. The time now is 10:08 AM.

Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Copyright 2006 DreamweaverClub.com