PDA

View Full Version : Random Banner Ads



SideTrack
08-05-2006, 06:50 PM
I want it for my VB forum and I am offering paid ads and only up 8 ads a month. I need somthing that will rotate the ads each time the site is refreshed on any computer.

Please help me out,
SideTrack

Twey
08-05-2006, 06:56 PM
Javascript isn't what you want. Try posting in the PHP forum.

mburt
08-05-2006, 07:13 PM
Twey: Well, you could use JavaScript to rotate the banners though, right?

SideTrack
08-05-2006, 07:27 PM
Thats what I thought and thats why I posted it in javascript

mburt
08-05-2006, 07:30 PM
Oh, I just read through again. You're asking for this when the window loads. To keep track of which was last, you should you PHP. Sorry, I miss read.

SideTrack
08-05-2006, 07:46 PM
no i just want the banners to to rotate with each page view.

Something like www.designsector.com has

mburt
08-05-2006, 08:14 PM
Yeah, when a new page, I guess you could say, loads. You still need to use a server-side language.

SideTrack
08-05-2006, 08:23 PM
What should I do? I posted this in php to

Twey
08-05-2006, 08:52 PM
No you didn't.

mburt
08-05-2006, 08:57 PM
http://www.dynamicdrive.com/forums/showthread.php?p=46951#post46951

SideTrack
08-05-2006, 09:27 PM
lOl as you see i did

Twey
08-05-2006, 09:38 PM
Oh, you did. I'd swear I saw it under HTML.

OK, carry on. :)

zeropsi
08-05-2006, 11:44 PM
You could try this:
Javascript:


function banner() {

banner = array();
number = 0;
// bannerArray
banner[number++] = ""; //banner_info
banner[number++] = ""; //banner_info
increment = Math.floor(Math.random() * number);
document.getElementById('banners').innerHTML = banner[increment];
}


HTML:


<body onload="banner();">
<div id="banners"></div>

SideTrack
08-07-2006, 06:58 AM
How would i put his in my vb