Jump to content

Welcome to Geeks to Go - Register now for FREE

Need help with your computer or device? Want to learn new tech skills? You're in the right place!
Geeks to Go is a friendly community of tech experts who can solve any problem you have. Just create a free account and post your question. Our volunteers will reply quickly and guide you through the steps. Don't let tech troubles stop you. Join Geeks to Go now and get the support you need!

How it Works Create Account
Photo

Random Index


  • Please log in to reply

#1
qubix

qubix

    New Member

  • Member
  • Pip
  • 1 posts
Let's see how well I can explain what I truly want.

I have a domain (in this example, I'll use) lame.com

Currently on my domain, I just have a picture being displayed.

What I would like to do is, have some list (in a file) of URL's..

In this example of lame.com I would have a file to list website's that I find lame. So when you go to my domain lame.com, you will be displayed some random URL that is in that list of URL's.

I would like to be able to do something similar to:

<HTML><HEAD><TITLE>Lame.com</TITLE></HEAD><script src="http://www.google-analytics.com/urchin.js" type="text/javascript"></script><script type="text/javascript">_uacct = "UA-4876-2";urchinTracker();</script><FRAMESET ROWS="100%" COLS="1000%">    <FRAME SRC="http://www.myspace.com/lameprofile">  <strong class='bbc'>**here would be a list of URLs to display randomly**</strong></FRAMESET></HTML>

To explain a little about why I'd like to use that scheme:
* The Header, I never want to change
* The google analytics is important to me
* I don't want my domain in the address bar to change, I only want the content to change

I truly hope this explains my wants, and I hope someone can help. Please contact me for further questions.
  • 0

Advertisements


#2
Kieran C

Kieran C

    Member

  • Member
  • PipPip
  • 51 posts
Do you want a random page to appear? Or just a different body?

To display a different page, add this to the head of your page:

[codebox]
<script type="text/javascript">
function changeURL()
{
var URLs=new Array();
URLs[0]="/page1.htm";
URLs[1]="/page2.htm";
URLs[2]="/page3.htm";

location.href=Math.random(URLs);
}
[/codebox]

And to your body, add:

[codebox]
<body onload="changeURL()"> ... </body>
[/codebox]
  • 0






Similar Topics

0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

As Featured On:

Microsoft Yahoo BBC MSN PC Magazine Washington Post HP