PDA

View Full Version : Need random include on page reload



Ezn
Aug 23rd, 2006, 04:18 PM
Hi all, newbie here. I'm good with HTML and CSS, not so much with coding JavaScript.

Anyway, I need a JavaScript that will display one of about 15 different include files every time the page reloads.

This is a bit more complicated than displaying a different image on reload.

Basically, I need to insert a random version of this:
<-- #include virtual="/includes/file01.htm" -->
into a page every time it reloads. There are 15 include files.

I have done much googling with a lot of different search terms with no luck.

Anybody got something?

Philip M
Aug 23rd, 2006, 05:11 PM
This is not a JavaScript question. Try Googling for random SSI server side includes
and see for example:-

http://www.weijers.net/guide/ssi.php

and

http://www.ssi-developer.net/ssi/ssi-random.shtml