I tried to put the two functions in that order and to assign them to the proper textboxes, unfortunately everything stop working. I am after all a newbie. Can someone explain me why?
<script>
function validNum(inField){
if (isNaN(inField.value)==true){
alert ("Please enter a valid number"

inField.focus()
inField.select()
}
}
function alphaOnly(inField){
// declare var of not valid characters thanks to onpnt for the list and the knowledge
var illChar = /[~`!@#$%^&*()_+=:;"'{}\[\]][0-9]/gi;
if (inField.value.search(illChar) != -1){
alert "Please enter characters only!"
inField.focus()
inField.select()
}
}
</script>
Html assignes:
<input name="alphaOnlyText" onBlur="alphaOnly(this)">
<input name="numbersOnly" onBlur="validNum(this)">