In this tutorial, I'm going to use a cookie to count the number of times a computer has been to your site. The purpose of the script is to place the cookie and retrieve it, adding one each time it visits.
Cookies JavaScript / Cookies and Sessions
A cookie lets you store a small amount of information about a user visiting your site. A cookie is a small text file that is stored on the site visitor's computer by their browser.Because the cookie is stored on the user's computer, it does not require any server space no matter how many users you have.You can use cookies to save user preferences, customize data, remember the last visit, or to keep track of items in an order while a user browses.
Variable Passing JavaScript / Forms
For those of you who need a way to pass variables across pages but wouldn't think of using a cookie to do it - try this.
Javascript Text Box Characters Counter JavaScript / Forms
Forms always require validation when they are used in not safe environments. One method is to verify the data submitted through POST or GET before actually executing the form action. Using Javascript it is possible to do this in a more simple way.
Loops JavaScript / Getting Started
JavaScript performs several types of repetitive operations, called "looping". Loops are set of instructions used to repeat the same block of code till a specified condition returns false or true depending on how you need it. To control the loops you can use counter variable that increments or decrements with each repetition of the loop.
Text Box Characters Counter (IE4+) JavaScript / Forms
In forms when using text boxes or text areas with limited character length (usually needed for forms that submit data to a database) it is always a good idea to tell the user how many characters they have remaining. The following example shows how you can do this. This is a very simple and cute idea to help the user know exactly how many characters he can type further. Do these small add-ons to your forms and they will look really professional.