Sunday 5 June 2011

Index page question (HTML and maybe Javascript?)?

I am wondering if a website can have multiple index pages (home pages) that alternate. In other words, the design of the home page can change at random when visited, even if the site structure stays the same. Is there a Javascript that can juggle index.html files at random? Maybe not. Just curious.|||There should be only one index.html, but the effect you suggest could be achieved in a number of ways.





The index page could contain a set of DOM nodes with unique id attributes. The content could be randomly selected and attached to the nodes at load time.





The index could hold a large number of content nodes, and only some of them would be randomly selected for display for any particular load.





The index page could contain an array of alternate %26quot;home%26quot; page urls. The index.html would serve only to set the window.location to a randomly selected version of the %26quot;home%26quot; page.





These are just the three ideas that leaped immediately to mind. I%26#039;m bettin%26#039; there%26#039;s more.|||you can set a default template with tables etc, but the content changes with a javascript. it is possible, try a yahoo search for it|||Yes, this easy.....





You can only have one index file because it would cause confusion.





You can setup that index file to alternate through different templates based on a random order.... (It can be based on countless factors like web browsers, operating systems, random order, etc...)





Any scripting language can achieve this like PHP or Javascript...