Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

how to fix random banner changes?

Participant ,
Jun 13, 2006 Jun 13, 2006

Copy link to clipboard

Copied

OK - got my positioning in the right place, but what am I doing wrong, since out of my 6 images (the random banners) only one will show up? All are in the same folder/path...after the 1st one loads successfully, when I reload, I just get a "?" mark logo in my banner area.

How to fix this?

Here's what I got in my head section:


<SCRIPT LANGUAGE="JavaScript">

<!-- This script and many more are available free online at -->

<!-- The JavaScript Source!! http://javascript.internet.com -->


<!-- Begin

var maxAdNo = 6

var adNo

var myAd = new Array()



myAd[0] = '<img src="images/banners/homeBanner.jpg" width="800" height="212" border="0">'

myAd[1] = '<img src="images/banners/homeBanner2.jpg" width="800" height="212" border="0">'

myAd[2] = '<img src="images/banners/homeBanner3.jpg" width="800" height="212" border="0">'

myAd[3] = '<img src="images/banners/homeBanner4.jpg" width="800" height="212" border="0">'

myAd[4] = '<img src="images/banners/HomebannerTinCan.swf" width="800" height="212" border="0">'

myAd[5] = '<img src="images/banners/SFbanner.swf" width="800" height="212" border="0">'



// End -->

</script>


Here's what I got in my body section:


<tr>
<td align="middle" bgcolor="#336600"><img height="10" src="images/spacer.gif" width="3" /></td></tr>
<tr>
<td>
<table width="100%" border="0" cellpadding="0" cellspacing="0">
<tbody>
<tr>
<td bgcolor="#ffffff" height="1"><img height="1" src="images/spacer.gif" width="3" /></td></tr>
<tr>
<td width="800">

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin

adNo = Math.round(Math.random() * maxAdNo)

document.write(myAd[adNo])

// End -->

</script>
</td>



Thanks
KB
TOPICS
Server side applications

Views

239
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Participant ,
Jun 14, 2006 Jun 14, 2006

Copy link to clipboard

Copied

LATEST
Any thoughts at all?

KB

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines