/ Only allows numeric values
function isNumeric(num){
var charCode = (num.which) ? num.which : event.keyCode;
if (charCode > 31 && (charCode < 48 || charCode > 57)) { return false; }
else { return true; }
}
function validateTextBoxLength() {
var tb = document.getElementById("TextBox1").value;
if (tb.length > 1 && tb.length != 4) {
alert("TextBox must be 4 digits.");
return false;
}
return true;
}
function rbSelectedValue() {
var radio = document.getElementsByName('<%= rblSearchType.ClientID %>');
var tb = document.getElementById("TextBox1").value;
for (var i = 0; i < radio.length; i++) {
if (radio[i].checked) {
if (tb.length > 1 && tb.length != 4) {
alert("TextBox must be 4 digits.");
return false;
}
else {
return true;
}
}
else {
return true;
}
}