Results 1 to 5 of 5

Thread: random html chunk select

  1. #1
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default random html chunk select

    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.

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    the problem is I need it to run off-line so I cant rely on cgi perl or the usual scripts

  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Well, you can't do it from a seperate file. The closest you could come is to have an external .js file containing definitions.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Mar 2006
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    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

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •