OMG!

Just to look at it, it ought to be obvious that this ghastly code is hopelessly inefficient and obsolete! Time to learn about regular expressions!
Try this:-
Code:
No numbers <input type = "text" id = "nonumbers" onblur = "nonums()"><br>
No text (numbers only) <input type = "text" id = "notext" onblur = "notext()"><br>
<script type = "text/javascript">
function nonums () {
var x = document.getElementById("nonumbers").value;
if (/[^a-z\s\-\']/gi.test(x)) { // alpha chars, space, hyphen and apostrophe are allowed as text in proper name - Mary-Lou O'Reilly
alert ("You may not enter any numbers or special characters into this box!");
document.getElementById("nonumbers").value = ""; // clear the box
return false;
}
}
function notext() {
var x = document.getElementById("notext").value;
if (/[^0-9]/gi.test(x)) {
// if (/[^0-9\.]/gi.test(x)) { // if decimal numbers allowed
alert ("You may enter only numbers into this box!");
document.getElementById("notext").value = "";
return false;
}
}
</script>
<script language=javascript> is long deprecated and obsolete. Use <script type = "text/javascript"> instead. The <!-- and //--> comment (hiding) tags have not been necessary since IE3 (i.e. since September 1997). If you see these in some published script it is a warning that you are looking at ancient and perhaps unreliable code.
onKeyUp="
javascript:chk_t(get_info.f_name);"
"javascript:" is completely redundant. And prefer to use lower case for onkeyup (which is inappropriate here anyway).
As an alternative to function notext(), you may care to try this for the box where the user must enter a number from 10 to 60.
Code:
function TenToSixtyOnly () {
var x = parseInt(document.getElementById("exp_mins").value);
if (isNaN(x) || x < 10 || x >60) { // isNaN means "is not a number"
alert ("You must enter a number from 10 to 60!");
document.getElementById("exp_mins").value = "";
return false;
}
}
Here is a more sophisticated alpha chars and space/hyphen/apostrophe script [you can use it to replace nonums() ] which works onkeypress, and defeats copying and pasting anything but letters in. I expect it is too advanced for you to understand fully so you may prefer to ignore it for the time being.
Code:
function isAlphaKey(e) {
var k;
document.all ? k = e.keyCode : k = e.which;
return ((k > 64 && k < 91) || (k > 96 && k < 123) || k == 8 || k ==45 || k ==39 || k ==32);
}
function extractAlpha(str) {
return str.replace(/[^a-z\s\.\-\']/gi,"");
}
</script>
Letters only <input type="text" onkeypress="return isAlphaKey(event)" onblur="this.value=extractAlpha(this.value)" /><br />
BTW, please help us to help you by following the posting guidelines and wrapping your code in CODE tags.
This means use the octothorpe or # button on the toolbar which will insert the tags. You can (and should) edit your previous post.
“I don't pretend we have all the answers. But the questions are certainly worth thinking about..” - Arthur C. Clarke quotes (English Writer of science fiction, b.1917