View Full Version : random html chunk select

03-08-2006, 09:47 AM
Hi there, I'm looking for a script that will allow me to place random html onto a webspage when it is reloaded. All of the random scripts that I have found do not allow anything but strings, such as random quote.
Anyone know of a random html chunk select script that picks up the html from one database type file rather than from individual html files?
Fundamentally what I have is many questions all formatted in html and I would like to select them at random for display on a webpage - I know I can do this with CGI or perl but I would like it to work off-server so to speak.

03-08-2006, 04:59 PM
If you can do it server-side, never do it client-side. Server-side scripts don't have compatibility issues; they don't increase bandwidth usage; and they don't slow down page rendering time.

03-19-2006, 04:44 PM
the problem is I need it to run off-line so I cant rely on cgi perl or the usual scripts

03-19-2006, 05:00 PM
Well, you can't do it from a seperate file. The closest you could come is to have an external .js file containing definitions.

03-20-2006, 01:46 AM
I have no problem with an external .js file but it seems that all the html has to be on one line an that doesn't give me scope for big chunks of html