Looking for a script taht rotates URLs

  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

Hey, I'm looking for a script that will open a new page everytime that page is opened.

I do not want a popup/under script...I saw this awhile ago but forgot where.

i.e. If I type http://www.xyz.com in my browser, http://www.ebay.com would open one time and if I went back later, http://www.yahoo.com could open the 2nd time, and so on.

Any ideas? I've been searching but can't find anything.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Basically you would just need JavaScript code that rotates thru an array of possible urls, probably wouldn't be hard to write, but am not sure off hand where you could find one. Maybe someone else has some code that can help you.
  • homer simpson
  • Student
  • Student
  • homer simpson
  • Posts: 96

Post 3+ Months Ago

I'll answer my own question here. (In case anyone else needs it).

<HTML><HEAD><TITLE>page.htm</TITLE>

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

function page() {
} ; p = new page() ; n = 0
//----Database-------
p[n++]= "http://www.ebay.com"
p[n++]= "http://www.yahoo.com"
p[n++]= "http://www.google.com"
p[n++]= "http://www.tacobell.com"
p[n++]= "http://www.usps.com"
// just keep adding..
//-------------------
i=Math.floor(Math.random() * n);
self.location.href=( p[i] );

//--></SCRIPT>
</HEAD><BODY>
<BR><BR>...page loading
</BODY></HTML>

That should do it.
  • Bigwebmaster
  • Site Admin
  • Site Admin
  • User avatar
  • Posts: 9090
  • Loc: Seattle, WA & Phoenix, AZ

Post 3+ Months Ago

Very nice, I am sure it will become useful for others :)

Post Information

  • Total Posts in this topic: 4 posts
  • Users browsing this forum: No registered users and 121 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
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.