|
actually this is my code of doing it:
function chkfname(n){
fn=n.value;
if(fn.length !=0){
if(isNaN(fn)==false){
alert('Only alpha chars are allowed...');
document.myform.fname.focus();
document.myform.fname.select();
}else{
if(fn.length >15){ // check the number of chars...
s=fn.slice(1,15);
document.myform.fname.value=s;
alert('allowed char is only 15');
document.myform.lname.focus();
}
}
}
}
...on ie, upon click ok on the alert it will go to fname txtbox. however if i use ff, it will go to the next. is there any problem with my code?
|