GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   javascript question for the programmers (https://gfy.com/showthread.php?t=414988)

fris 01-11-2005 08:44 AM

javascript question for the programmers
 
i have banners.js which has my teen solo sites in it and i have banners2.js which has all other sites reality sites and so on. i just wanted to seperated the 2. is there any way i can put them on a site but load them randomly?

cfU 01-11-2005 08:59 AM

Could do a random counter and then depending on the value
do a
document.write("<SCRIPT TYPE="text/javascript" .............
to which banners you want on the page, no?

arachnO 01-11-2005 10:25 AM

<script>
var ran_number=Math.round(Math.random()) + 1;
document.write ('<script src=banner' + ran_number + '.js'></script>');
</script>

something like this I think...


All times are GMT -7. The time now is 11:51 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2025, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123