Results 1 to 5 of 5

Thread: Random Page Display?

  1. #1
    Join Date
    Apr 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Random Page Display?

    Is there a way I could have part of my website change every time the user visits the page without using frames?

  2. #2
    Join Date
    Mar 2006
    Location
    Illinois, USA
    Posts
    12,164
    Thanks
    265
    Thanked 690 Times in 678 Posts

    Default

    You would need to use some sort of dynamic programming language. This could be just Javascript, or a serverside language like PHP or ASP.
    Javascript requires that the user has javascript available/enabled so it won't always work. It also requires that the content is all loaded and then most of it is hidden and one random part is shown. This is best for very small bits of content, I think. You could also attempt to use Ajax (maybe not the best idea here) to load extra content into the page (randomly) after it had loaded-- you could even reload the entire page randomly.
    For a serverside language, this would be easy (once you understand a little bit about how the language works in general), and you could make anything from a single line to the whole page random.

    How much of the page needs to be random and which programming language(s) would you want to use?


    Finally, one thing to remember is that this is a bad idea for search engines: if the content always changes, their stored version won't match the real content and it may lower your page's rank.
    For this reason, it may be a much better idea to randomize a link on the page (a link that says "random page") rather than making a single page actually random. Does that make sense? Instead of visiting random.htm to see random content, you simply click a "random" link that has a direct link to a real page like content7.htm or content3.htm-- it's the link that changes, not the pages. This also could be done in Javascript or a serverside language. Again, Javascript would require that it can run on the user's computer. A serverside language, if possible, is usually the better choice for that reason, but maybe a little harder to use. Either way, that's not very difficult.
    Daniel - Freelance Web Design | <?php?> | <html>| espa˝ol | Deutsch | italiano | portuguŕs | catalÓ | un peu de franšais | some knowledge of several other languages: I can sometimes help translate here on DD | Linguistics Forum

  3. #3
    Join Date
    Apr 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Sorry, I should've said this in my opening post.

    I'm basically building a portfolio website and would like a section with an example of my work on the home page at the size of about 285 x 325 pixels. I had previously used a random image code but I would now like a description to go with it. Is there a way this could be done?

    I did find an iframe code that could do this but as you said, using frames isn't a good idea for search engines so I might have to scrap this idea and go with something else.

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    30,495
    Thanks
    82
    Thanked 3,449 Times in 3,410 Posts
    Blog Entries
    12

    Default

    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    http://www.dynamicdrive.com/dynamici...army/index.htm

    Either of the two above linked slide show scripts can do text and image. And they can each also be set up in manual mode without controls. And they each also have an optional random setting. So it's just a matter of which one you like. As I say, either can be set to show just one image w/description on load.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

  5. #5
    Join Date
    Apr 2010
    Posts
    7
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Quote Originally Posted by jscheuer1 View Post
    http://www.dynamicdrive.com/dynamici...nslideshow.htm

    http://www.dynamicdrive.com/dynamici...army/index.htm

    Either of the two above linked slide show scripts can do text and image. And they can each also be set up in manual mode without controls. And they each also have an optional random setting. So it's just a matter of which one you like. As I say, either can be set to show just one image w/description on load.
    This'll do nicely, cheers.

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
  •