Archive for the ‘Javascript’ Category

First of all you must be a little familiar with jQuery. But you are not expected to be a jQuery expert. Secondly, you must also be familiar with javascript and CSS and thirdly, you must be eager to learn :). For quite a few days I was searching for something that gives me the ability […]

If you want to validate an email field using simple and easy Javascript without any fancy looks then here is the function that can help you… Click more to find out the Javascript function

This is the javascript code that will help you if you want to check or uncheck all the checkbox elements in your form. function checkall(){ for(i=0; i<document.FormName.elements.length; i++){ if(document.FormName.elements[i].type==”checkbox”){ document.FormName.elements[i].checked=true; } } } function uncheckall(){ for(i=0; i<document.FormName.elements.length; i++){ if(document.FormName.elements[i].type==”checkbox”){ document.FormName.elements[i].checked=false; } } }

Sometimes you really want to iterate through all elements of a form, especially if you want to debug and you want to know about every element in your form. Also if you want to perform same function similar elements, this comes in handy. For example, if you want to check/uncheck all the checkboxes in your […]

how to trim or eliminate the spaces in a string through javascript