Advertise Here

Author Topic: Rotating Banner Code... Showing "undefined"  (Read 1808 times)

0 Members and 1 Guest are viewing this topic.

Offline taogem

  • SMF For Free Hero
  • *
  • Posts: 840
    • View Profile
    • My Snuff Bottle Journal

  • Total Badges: 29
    Badges: (View All)
    Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Rotating Banner Code... Showing "undefined"
« on: May 03, 2014, 02:31:27 am »
Forum Url: http://gemstone.smfforfree4.com/
Can anyone see something wrong with this ?

Getting the word "undefined" showing up sometimes when there should be a banner.

Banner code top center of forum, Header...

Code: [Select]


<script language="JavaScript"><!--
//Javascript Created by Computerhope http://www.computerhope.com
//store the quotations in arrays
images = new Array(14);

images[0] = "<a href = 'http://idahorockshop.com/'><img src='http://i1039.photobucket.com/albums/a475/lifepath2012/idahorockshop.jpg' alt='Computer Hope Newsletter'></a>";
images[1] = "<a href = ‘http://www.donniesrockytreasures.com/index.html/'><img src='http://i1270.photobucket.com/albums/jj612/snuffbottlesplus/DonniesTreasures_zps51cf0eb1.jpg' alt='Computer Hope Newsletter'></a>";
images[2] = "<a href = ‘http://www.hummingbirdstones.com/'><img src='http://www.hummingbirdstones.com/picts/banner-1.jpg' alt='Computer Hope Newsletter'></a>";
images[3] = "<a href = ‘http://www.idahorockshop.com/'><img src='http://i188.photobucket.com/albums/z229/catmandewe/banner1a.jpg' alt='Computer Hope Newsletter'></a>";

index = Math.floor(Math.random() * images.length);
document.write(images[index]);
//done
// --></script></center><p>


Offline SMF For Free

  • Administrator
  • *
  • Posts: 7187
    • View Profile
    • SMF For Free

  • Total Badges: 38
    Badges: (View All)
    Quick Poster Tenth year Anniversary Spammer 25 Posts in one day Nineth year Anniversary Eighth year Anniversary
Re: Rotating Banner Code... Showing "undefined"
« Reply #1 on: May 03, 2014, 07:44:05 am »
images = new Array(14);
Should be I belive
images = new Array(4);

Since you only have a couple entries.
SMF For Free-Free Simple Machines Forum hosting.
Like What I do? Support me at https://www.patreon.com/vbgamer45/

Offline taogem

  • SMF For Free Hero
  • *
  • Posts: 840
    • View Profile
    • My Snuff Bottle Journal

  • Total Badges: 29
    Badges: (View All)
    Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: Rotating Banner Code... Showing "undefined"
« Reply #2 on: May 03, 2014, 11:38:31 pm »
Looks like that did the trick..

Thank you  :)

Offline taogem

  • SMF For Free Hero
  • *
  • Posts: 840
    • View Profile
    • My Snuff Bottle Journal

  • Total Badges: 29
    Badges: (View All)
    Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: Rotating Banner Code... Showing "undefined"
« Reply #3 on: May 04, 2014, 12:56:46 am »
Guess I spoke to soon...

At my last post, did not actually click on the banners.. Which are all there and rotating fine..

But, for some reason, now when I click on any of the banners, am getting this message..

Forbidden

You don't have permission to access /‘http://www.hummingbirdstones.com/' on this server.

They were working fine and directing to the members websites before I made that small change from 14 to 4


Offline taogem

  • SMF For Free Hero
  • *
  • Posts: 840
    • View Profile
    • My Snuff Bottle Journal

  • Total Badges: 29
    Badges: (View All)
    Tenth year Anniversary Nineth year Anniversary Eighth year Anniversary Seventh year Anniversary Sixth year Anniversary
Re: Rotating Banner Code... Showing "undefined"
« Reply #4 on: May 04, 2014, 03:58:05 pm »
Never mind answering further on this topic....

I changed from the script I had ( found online ) to the one created by Agent Moose in another topic.. http://www.smfsupport.com/support/smf-for-free-codes-and-support/%28code%29-random-banner/


 

Related Topics

  Subject / Started by Replies Last post
3 Replies
1783 Views
Last post July 27, 2007, 05:10:31 pm
by doggiedoo86
9 Replies
1842 Views
Last post October 29, 2007, 09:18:19 pm
by LaundryLady
2 Replies
783 Views
Last post November 14, 2007, 08:31:34 pm
by Nick_LRG
0 Replies
770 Views
Last post May 15, 2008, 06:47:08 pm
by Lucas A33
7 Replies
1086 Views
Last post May 27, 2010, 08:42:01 am
by -A-