It is currently 20 Apr 2024, 07:37

All times are UTC+11:00




Post new topic  Reply to topic  [ 9 posts ] 
Author Message
 Post subject: Banner ad
PostPosted: 17 Mar 2014, 12:53 
Offline
Fanatical Senior Member

Joined: 03 Nov 2005, 02:36
Posts: 1248
Not sure who I should let know but Brett's banner ad is coming up as undefined and has been for a while. I don't know if it's a linux thing, firefox or at your end.

_________________
WARNING: CONTAINS CARROT


Top
   
 Post subject: Re: Banner ad
PostPosted: 17 Mar 2014, 14:46 
Offline
Fanatical Senior Member

Joined: 26 Nov 2005, 18:10
Posts: 1044
aaaaarrrrrgggghhhh !!!!!! KKKKKuuuurrrrrtttttt. HHHHeeeellllpppp.


Top
   
 Post subject: Re: Banner ad
PostPosted: 17 Mar 2014, 17:40 
Offline
Senior Member

Joined: 19 Aug 2011, 21:36
Posts: 293
I'm getting it as well (Chrome on Windows 7) - it aint ur OS or browser greg.... though I don't think its specifically related to Bretts banner, just the way the banner selection is occuring....

Probably something in the JS function which decides which banner is going to return...
Code:
function random_banner(){
  var i=0;
  banners = new Array();
  banners[0] = '<a href="http://www.esclapezaustralia.com.au"><IMG SRC="/images/bi.jpg" WIDTH="650" HEIGHT="100">';
  banners[1] = '<a href="http://www.bwhi.com.au" target="_blank"><IMG SRC="/images/bwhi.jpg" WIDTH="650" HEIGHT="100">';
  banners[2] = '<a href="http://www.brimbosports.com" target="_blank"><IMG SRC="/images/brimbo.jpg" WIDTH="650" HEIGHT="100">';
  today = new Date();
  i=today.getSeconds();
  n=banners.length;
  return banners[i-Math.round((i-2)/n)*n];
}


Maybe its that math library or the way its being called? Undefined usually means that you're breaking an array or not calling an element correctly or something...


Top
   
 Post subject: Re: Banner ad
PostPosted: 17 Mar 2014, 17:45 
Offline
General Committee Member
User avatar

Joined: 18 Mar 2008, 10:01
Posts: 761
Location: Shepparton Vic
ossk, please speak english on this forum ! :lol: :lol:

_________________
Why is salt water so far away and the weather so crappy at this time of the year ?


Top
   
 Post subject: Re: Banner ad
PostPosted: 17 Mar 2014, 17:53 
Offline
Senior Member

Joined: 19 Aug 2011, 21:36
Posts: 293
Sorry mate, just trying to help :)

Try something like the below in your random_banner function? Just tested it and not getting an undefined, also getting all 3 banners in seemingly random distribution...
Code:
return banners[Math.floor((Math.random()*3))];


Top
   
 Post subject: Re: Banner ad
PostPosted: 16 Jul 2014, 10:25 
Offline
Fanatical Senior Member

Joined: 03 Nov 2005, 02:36
Posts: 1248
Did you know this is still happening Brett?

_________________
WARNING: CONTAINS CARROT


Top
   
 Post subject: Re: Banner ad
PostPosted: 16 Jul 2014, 18:04 
Offline
Fanatical Senior Member

Joined: 26 Nov 2005, 18:10
Posts: 1044
Stoj ......used to link to the Esclapez Australia website ?????


Top
   
 Post subject: Re: Banner ad
PostPosted: 17 Jul 2014, 10:57 
Offline
Administrator
User avatar

Joined: 05 Jun 2011, 23:43
Posts: 320
I'll look into it and get back to you.

-Stoj


Top
   
 Post subject: Re: Banner ad
PostPosted: 25 Mar 2015, 23:50 
Offline
Administrator
User avatar

Joined: 05 Jun 2011, 23:43
Posts: 320
Hey Brett,

I fixed it!

If you have an updated banner, send it over and i can replace the current one.
Please note it needs to be 650 pixels wide by 100 pixels high (same size as current one).

-Stoj


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 9 posts ] 

All times are UTC+11:00


Who is online

Users browsing this forum: No registered users and 44 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Limited
[ GZIP: Off ]