The Daily Static
  The Daily Static
UF Archives
Register
UF Membership
Ad Free Site
Postcards
Community

Geekfinder
UFie Gear
Advertise on UF

Forum Rules
& FAQ


Username

Password


Create a New Account

 
 

Back to UserFriendly Strip Comments Index

Need help. by skippy-ish_guy2005-03-22 17:46:37
  Server- or client-side? by tnglives 2005-03-22 18:13:20
When you define "objects," I'm assuming it's something that can be represented as HTML, be it plain text, html tags, or an image reference.

Options:
1) Server-side database
JSP, ASP, etc allow you to say [html]...<%=object_here%>...[/html] or some variant thereof. A database call would make it trivial to add more such objects. Randomization is a little bit of a mental exercise, but not a horrible one. However, there's a bit of a learning curve.

2) Server-side script with sequentially-named files
Most scripting languages allow you to open external files to include in the output. Name them 0001.inc-1000.inc and use a random function to pick one.

3) Client-side script with sequentially-named files
Do pretty much the same thing with the exec() statement in JavaScript to write a [script language="javascript" src="0001.js"]. Then have that .js file do a document.write() of whatever you need. I'll have to check whether browsers support this kind of multi-pass scripting. I seem to recall using something like that before, but it was a few years ago. Otherwise, there's probably another workaround for opening external content.
[ Reply ]
    3) will work by ToLazyToThink2005-03-22 21:00:42

 

[Todays Cartoon Discussion] [News Index]

Come get yer ARS (Account Registration System) Source Code here!
All images, characters, content and text are copyrighted and trademarks of J.D. Frazer except where other ownership applies. Don't do bad things, we have lawyers.
UserFriendly.Org and its operators are not liable for comments or content posted by its visitors, and will cheerfully assist the lawful authorities in hunting down script-kiddies, spammers and other net scum. And if you're really bad, we'll call your mom. (We're not kidding, we've done it before.)