Professional Web Applications Themes

Presenting a list in random order - HTML & CSS

I have a client with 150+ employees, who wants a line for each of them on the corporate website I'm building, but he wants them presented in random order every time the page is downloaded, so there is no apparent favoritism. Can you do this within Dreamweaver or html? Does it need PERL scripting or MySQL? Is there a Dreamweaver extension? I'd appreciate any help anyone can give. Thanks. northerncaller...

  1. #1

    Default Presenting a list in random order

    I have a client with 150+ employees, who wants a line for each of them on the corporate website I'm building, but he wants them presented in random order every time the page is downloaded, so there is no apparent favoritism. Can you do this within Dreamweaver or html? Does it need PERL scripting or MySQL? Is there a Dreamweaver extension? I'd appreciate any help anyone can give.

    Thanks.

    northerncaller


    northerncaller webforumsuser@macromedia.com Guest

  2. #2

    Default Re: Presenting a list in random order

    <script language="JavaScript">
    Array.prototype.shuffle= function(times){
    var i,j,t,l=this.length;
    while(times--){
    with(Math){
    i=floor(random()*l);j=floor(random()*l);}
    t=this[i];this[i]=this[j];this[j]=t;
    }
    return this;
    }
    var employees=["Alabama","Alaska","Arizona","Arkansas","Californi a","Colorado","Connecticut","Delaware","Florida"," Georgia","Hawaii","Idaho","Illinois","Indiana","Io wa","Kansas","Kentucky","Louisiana","Maine","Maryl and","Massachusetts","Michigan","Minnesota","Missi ssippi","Missouri","Montana","Nebraska","Nevada"," New Hampshire","New Jersey","New Mexico","New York","North
    Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania", "Rhode Island","South Carolina","South Dakota","Tennessee","Texas","Utah","Vermont","Virg inia","Washington","West Virginia","Wisconsin","Wyoming"]
    doent.write(employees.shuffle(200).join("<BR>") )
    </script>

    "\"northerncaller\" webforumsuser"macromedia.com wrote:
    > I have a client with 150+ employees, who wants a line for each of them on the corporate website I'm building, but he wants them presented in random order every time the page is downloaded, so there is no apparent favoritism. Can you do this within Dreamweaver or html? Does it need PERL scripting or MySQL? Is there a Dreamweaver extension? I'd appreciate any help anyone can give.
    >
    > Thanks.
    >
    > northerncaller
    mick_white Guest

  3. #3

    Default Re: Presenting a list in random order

    What would exhibit less favouritism than simple alphabetical order?
    It's worked in that arena of inflated egos, the theatre, for hundreds of
    years
    And how about when someone wants to scan the list to find one of your 150
    employees?
    Will they appreciate the random aspect then?

    just suggestions

    Jason

    "mick_white" <mickgerrytimlin.com> wrote in message
    news:3F268663.9CCA6AFEgerrytimlin.com...
    > <script language="JavaScript">
    > Array.prototype.shuffle= function(times){
    > var i,j,t,l=this.length;
    > while(times--){
    > with(Math){
    > i=floor(random()*l);j=floor(random()*l);}
    > t=this[i];this[i]=this[j];this[j]=t;
    > }
    > return this;
    > }
    > var
    employees=["Alabama","Alaska","Arizona","Arkansas","Californi a","Colorado","
    Connecticut","Delaware","Florida","Georgia","Hawai i","Idaho","Illinois","Ind
    iana","Iowa","Kansas","Kentucky","Louisiana","Main e","Maryland","Massachuset
    ts","Michigan","Minnesota","Mississippi","Missouri ","Montana","Nebraska","Ne
    vada","New Hampshire","New Jersey","New Mexico","New York","North
    > Carolina","North Dakota","Ohio","Oklahoma","Oregon","Pennsylvania", "Rhode
    Island","South Carolina","South
    Dakota","Tennessee","Texas","Utah","Vermont","Virg inia","Washington","West
    Virginia","Wisconsin","Wyoming"]
    > doent.write(employees.shuffle(200).join("<BR>") )
    > </script>
    >
    > "\"northerncaller\" webforumsuser"macromedia.com wrote:
    >
    > > I have a client with 150+ employees, who wants a line for each of them
    on the corporate website I'm building, but he wants them presented in random
    order every time the page is downloaded, so there is no apparent favoritism.
    Can you do this within Dreamweaver or html? Does it need PERL scripting or
    MySQL? Is there a Dreamweaver extension? I'd appreciate any help anyone can
    give.
    > >
    > > Thanks.
    > >
    > > northerncaller
    >

    jason kennedy Guest

Similar Threads

  1. random list
    By mezalick in forum Macromedia Dynamic HTML
    Replies: 0
    Last Post: March 14th, 10:22 PM
  2. Display dataset results in a random order
    By jt_advance in forum Dreamweaver AppDev
    Replies: 1
    Last Post: May 25th, 09:50 PM
  3. random order results from MS access database
    By bawaite in forum Coldfusion Database Access
    Replies: 4
    Last Post: April 8th, 12:40 PM
  4. getting a list of random numbers
    By Thomas L in forum PHP Development
    Replies: 3
    Last Post: January 3rd, 01:33 PM
  5. random pick from list
    By Shane in forum Macromedia Director Lingo
    Replies: 0
    Last Post: August 13th, 01:47 AM

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
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139