Archive for July, 2009

How to create a masked textbox using JavaScript

Wednesday, July 8th, 2009

This article demonstrates how to implement a masked input box or masked textbox using JavaScript. For example, let's imagine you have a simple HTML form and want to restrict the user to enter on numbers in a Telephone number field. The following code will demonstrate how to to capture the ...

Random number generator for JavaScript

Tuesday, July 7th, 2009

Need to know how to generate a random number in JavaScript? The following code will do the job. There are a lot of articles on the internet explaining how to generate a random number between 0 and 10 (for example), but not so many explaining how to generate a random ...