Random Page Button?

Discussion in 'HTML & Website Design' started by ozirock, Apr 3, 2009.

  1. #1
    Hello everyone,
    I'm a beginner and know very little about html so I was wondering is it possible to place a button on my site which randomly selects one of the pages on my site? It is a flash games site so i'd like like to let people just get a random game if they want.
     
    ozirock, Apr 3, 2009 IP
  2. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #2
    You need a function to do this, can use javascript. Few ways i can think of for doing this so depends on your websites structure.
    1. Can use a random number generator and reference the number to an array index which is assigned to a url.
    2. If your webpages are simply numbered e.g. "1.php" then you could just produce a random number and append the result to the end of your websites url then append the file extension.

    There may be some pre built function out there that im not aware of though..
     
    Oxi, Apr 3, 2009 IP
  3. ozirock

    ozirock Member

    Messages:
    235
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #3
    Thanks Oxi,
    I got it figured out from what you said I needed and I've put how to do it on here for anyone else who wants it :)
     
    ozirock, Apr 3, 2009 IP
  4. Oxi

    Oxi Peon

    Messages:
    78
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    0
    #4
    Glad i could help :) Looks all good to me.
     
    Oxi, Apr 3, 2009 IP
  5. £££

    £££ Peon

    Messages:
    245
    Likes Received:
    7
    Best Answers:
    0
    Trophy Points:
    0
    #5
    Flash & Buttons won't do your site much good from an SEO perspective since the search engines will find it difficult to read both of them.

    Designing a site to look 'cutesy' or 'cool' will damage your search engine rankings.

    To link to another page you are best using long tailed keywords.

    If you insist on using buttons on your site, I don't know if this is any use to you? Just throwing it out there, I saw it a few moments ago whilst looking up something else for another individual here a post or two ago, on another thread:

    http://jirox.net/AsButtonGen/

    Found it here:

    http://mashable.com/2008/11/05/web-design-toolbox/
     
    £££, Apr 3, 2009 IP
  6. ILiketohelp

    ILiketohelp Guest

    Messages:
    756
    Likes Received:
    5
    Best Answers:
    0
    Trophy Points:
    0
    #6
    Ya try not to use flash buttons unless you really need to. Also, you can do this in PHP if you are looking for a server side coding.
     
    ILiketohelp, Apr 3, 2009 IP
  7. innovati

    innovati Peon

    Messages:
    948
    Likes Received:
    63
    Best Answers:
    1
    Trophy Points:
    0
    #7
    That's a total lie - the webcrawler doesn't SEE your site anyway, it doesn't care whether it's pink and the images are oversized and plasticy, or if it's only greyscale and tiny image borders - the STYLE of the site makes no difference.

    Please check your facts before posting here.

    Think about it, the webcrawlers are designed and programmed to accomodate US, and what WE DO naturally, and how WE make the best, most relevant sites.

    The algorithms look for what HUMANS would consider the most relevant.

    WE shouldn't need to do anything more than write good standards-compliant code and it's up to the search engine folks to write good algorithms, and if they fail to do that, people will simply move to a search engine that DOES offer relevant human-friendly results.

    I'm soo sick of hearing "you need to do this or that for SEO for it to work" you shouldn't *need* to do anything.
     
    innovati, Apr 3, 2009 IP
  8. ozirock

    ozirock Member

    Messages:
    235
    Likes Received:
    4
    Best Answers:
    0
    Trophy Points:
    33
    #8
    Thanks for everyone's advice but I agree with innovati, I dont really care what google thinks of it, the button does what I want and I like it so it shall be staying.
     
    ozirock, Apr 4, 2009 IP