spacer
Web Development Tutorials JAVASCRIPT Tutorials
 Developer Newsletter

Tutorials
AJAX
ASP
CGI & Perl
CSS
Flash
HTML
Illustrator
Java
JavaScript
Linux
MySQL
PHP
Photoshop
Python
Wireless
XML
Miscellaneous


Scripts Directory
AJAX Scripts
ASP Scripts
ASP.NET Scripts
CGI & Perl Scripts
Flash Scripts
Java Scripts
JavaScript Scripts
PHP Scripts
Python Scripts
Remotely Hosted Scripts
Tools & Utilities Scripts
XML Scripts

Web Hosting Directory
ASP.NET
Budget
Dedicated Servers
Ecommerce
Linux
Resellers
Shared
Small Business
Windows

Developer Manuals
Learn HTML
Learn PHP
Learn CSS
Learn AJAX
Learn JavaScript
Learn Pear
Free White Papers

Developer Resources
Developer Tools
Developer Content
Survey Software
Dedicated Servers




How to Setup a Randomising Function

By Arbitrary Constant
2007-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


 | Bookmark Print |   Write For Us
Related Tutorials:
» JavaScript Debugging Techniques with Firebug
» Striped Tables Using JavaScript
» Opening PDFs in a New Window with JavaScript
» Essential Javascript -- A Javascript Tutorial
» Submit Forms Conditionally using JavaScript
» Introduction to JavaScript Tutorial



About the NetVisits, Inc Network | Write For Us | Advertise
Copyright ©2007 NetVisits, Inc Network. All Rights Reserved. Privacy Policy.
Visit other NetVisits, Inc. sites: