Ellie_Penguin Posted June 24, 2007 Posted June 24, 2007 Okay so you know how on some sites they have their sponsors on the right and sometimes the sponsor ad changes to another every few mins or so? Does anyone know how to do that? Thanks. Quote
Zac Posted June 25, 2007 Posted June 25, 2007 Yeah....I use this (sorta-comlicated) javascript code on my website: <!-- function create() { this.width = '' this.height = '' this.src = '' this.href = '' this.border = '' this.mouseover = '' } ads = new Array() for(var i=1; i<=5; i++) { ads[i] = new create() } ads[1].width = "" ads[1].height = "" ads[1].src = "" ads[1].href = """ ads[1].border = "" ads[1].mouseover = "" ads[2].width = "" ads[2].height = "" ads[2].src = "" ads[2].href = "" ads[2].border = "" ads[2].mouseover = "" ads[3.width = "" ads[3.height = "" ads[3.src = "" ads[3.href = "" ads[3.border = "" ads[3.mouseover = "" ads[4].width = "" ads[4].height = "" ads[4].src = "" ads[4].href = "" ads[4].border = "" ads[4].mouseover = "" ads[4].width = "" ads[4].height = "" ads[4].src = "" ads[4].href = "" ads[4].border = "" ads[4].mouseover = "" var n = Math.random() + '' n = parseInt(n.charAt(5)) if(n >5) { n = n - 5 } else if(n==0) { n = n + 5 } n += "" var image = ads[n] var ad = "" ad += '<a href="' + image.href + '" \n' ad += 'onMouseOver="self.status=\'' + image.mouseover + '\'\;return true" \n' ad += 'onMouseOut="self.status=\'\'"> \n' ad += '<img src="' + image.src + '" width=' + image.width ad += '\n height=' + image.height + ' border=' + image.border Thats what makes them switch between 5 different image links everytime a page loads/refreshes... I hope thats what you were talking about ;) Quote
Ellie_Penguin Posted June 26, 2007 Author Posted June 26, 2007 That one is useful, but I meant a code that changes the ads without refreshing the page or something. Quote
Xepha Posted June 26, 2007 Posted June 26, 2007 Yeah, that's what I understood when I read your post... it is probably possible to do it, but I don't know how so far. Will lurk on some sites and give you link if I find it :P EDIT : I found this site http://www.scripts.com/viewscript/bannerblair-live/13955/ I have no idea how well it works, so you will have to try it by yourself, but the descrition seems acurate to what you are looking for. Quote
Ellie_Penguin Posted June 26, 2007 Author Posted June 26, 2007 YES! That's the stuff I need. Thanks a bunch! I'll give it a try. Nvm, that website doesn't work...it gets all funny when i click on try it for free. Thanks anyway! Quote
Matt Posted June 26, 2007 Posted June 26, 2007 I could've SWORN I posted a reply to this... http://rainbow.arch.scriptmania.com/script...nnerrotate.html That might help...? Quote
Ellie_Penguin Posted June 26, 2007 Author Posted June 26, 2007 Thanks Matt! That works. And thanks to everyone for the help XD. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.