Javascript: email address field validation

January 22, 2009

Use the following code
Read the rest of this entry »


Javascript: Numerical Only

January 22, 2009

Use this javascript function to check whether the textbox value is numerical or not

function NumericalOnly() {
var numericalOnly = new RegExp(“^[0-9]*$”)
var textbox = document.getElementById(“TextBox1″).value;
if (!numericalOnly.test(textbox)) {
alert(“Please enter a valid number!”)
}
}

Thanks,
Anil.


Javascript: Validate Date

January 22, 2009

Put this code in the script tag under head tag.
Read the rest of this entry »


Javascript: Remove WhiteSpace

January 22, 2009