Tip Generator

Even if you have no knowledge of JavaScript coding whatsoever you can add a simple random tip script into your web page. Simply type the tips you want to display into the form below one at a time and then press the "Add Tip" button. The random tip script will appear in the textarea below and will include all of the tips you have entered so far. Just keep adding tips until all of the tips you need have been entered.

If you want to get fancier you can even include HTML codes within the tips.


Once you have entered all of the tips you then just need to press the "Highlight All" button and copy and paste the code into a plain text editor such as notepad. Save the file as tip.js and upload the file to your site.

The final step is to attach the script into your web page in the body section of your page where you want the tips to appear using the following code:

<script type="text/javascript" src="tip.js">

Each time the page is displayed, one of the tips will be selected at random and displayed at that spot within the page.


This article written by Stephen Chapman, Felgall Pty Ltd.

go to top

FaceBook Follow
Twitter Follow