
|
|
|||
How to Setup a Randomising FunctionBy Arbitrary Constant2007-11-17
How to set up a randomising function A couple of sections on arbitrary constant used to utilise JavaScript in order to generate some random content for that pesky right column. This was done for two reasons: 1) to give the site a bit more depth and 2) to help me learn the basics of JavaScript. Now that both of these goals have been achieved, here is a guide detailing how it is done, which will hopefully prove useful to anyone new to this sort of thing. Overview Generating a random entity on a page can be split into three sections:
1) defining the entities you wish to choose between (i.e. text, images, banners etc)
2) defining a randomising function 3) using that function to return your desired entity
Each of these sections are dealt with in turn.
Tutorial Pages: » How to set up a randomising function » Defining your entities » Defining a randomising function » Displaying the random entity |
||||
| About the NetVisits, Inc Network | Write For Us | Advertise Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy. |
Visit other NetVisits, Inc. sites: |