Snitz Forums 2000
Snitz Forums 2000
Home | Profile | Register | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 Community Forums
 Community Discussions (All other subjects)
 banners...
 New Topic  Topic Locked
 Printer Friendly
Author Previous Topic Topic Next Topic  

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 26 February 2004 :  15:52:12  Show Profile  Visit Jezmeister's Homepage
i hav way to many banners for my site at the mo and the number is increasing almost everyday... my main problem is that i hav used a bit of code i found on a google search that displays the banners randomly. the problem is that the banners that would generate more money from clicks etc rnt being shown enough - is there a way to make some sort of level of importance so that the most important ones are shown more often? heres wot im using:

<SCRIPT LANGUAGE="Javascript"><!--

function banner() {
};

banner = new banner();
number = 0;

// bannerArray
banner[1] = "<a href='http://www.url1.com' target='_blank'><img src='images/banner-1.gif' border='0'></a>"
banner[2] = "<a href='http://www.url2.com' target='_blank'><img src='images/banner-2.gif' border='0'></a>"
banner[3] = "<a href='http://www.url3.com' target='_blank'><img src='images/banner-3.gif' border='0'></a>"
banner[4] = "<a href='http://www.url4.com' target='_blank'><img src='images/banner-4.gif' border='0'></a>"
banner[5] = "<a href='http://www.url5.com' target='_blank'><img src='images/banner-5.gif' border='0'></a>"

increment = Math.floor(Math.random() * number);

document.write(banner[increment]);

//--></SCRIPT>

laser
Advanced Member

Australia
3859 Posts

Posted - 26 February 2004 :  15:55:33  Show Profile
Easiest solution ... the banners that you want displayed more, you have more array entries for, so ...

1 www.url1.com
2 www.url2.com
3 www.url3.com
4 www.url4.com
5 www.url5.com
6 www.url1.com
7 www.url1.com
8 www.url1.com
9 www.url1.com

Then you'll get a lot more url1 hits.
Go to Top of Page

Jezmeister
Senior Member

United Kingdom
1141 Posts

Posted - 26 February 2004 :  16:09:03  Show Profile  Visit Jezmeister's Homepage
yeh i thought of that i jst wondered if there was a way to do it without repeating... lol dont no y really... in fact thinking about it this really was pointless lol... sorry...
cheers nyway...
Go to Top of Page

laser
Advanced Member

Australia
3859 Posts

Posted - 26 February 2004 :  16:19:28  Show Profile
I don't use an array, just a Select Case, so I don't have to repeat the URL lines, just add more numbers to the Case I want promoted more
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Topic Locked
 Printer Friendly
Jump To:
Snitz Forums 2000 © 2000-2021 Snitz™ Communications Go To Top Of Page
This page was generated in 0.97 seconds. Powered By: Snitz Forums 2000 Version 3.4.07