JavaScript Trim Method

There are number of ways you can trim strings using javascript. The best way is to prototype the string object, adding a trim method, so you can perform the action by merely calling “string.trim()”. [Read More]
Tags: javascript

JavaScript Error Handling

Error trapping with JavaScript only works for newer generation browsers. However, older browser generally ignore window.onerror code, so it is worth putting in. There are two ways to do this: [Read More]
Tags: javascript

JavaScript Regular Expressions

Regular expressions are objects in JavaScript. For example, if you have an input field that should only allow characters a-z (lower and upper case) and numerical digits, you could use regular expressions to do the input validation as follows: [Read More]
Tags: javascript