Can you Specify where do I place the focus() line???/
function validate(){
if((document.forms['general_form']['comments'].value.length>0)||
(document.forms['general_form']['custentitydrxcomments'].value.length>0)){
alert('Please check the comments before making any changes.');
}
}
Uhm...you want it right after the alert? All you have to do is add that line:
Code:
function validate(){
if((document.forms['general_form']['comments'].value.length>0)||
(document.forms['general_form']['custentitydrxcomments'].value.length>0)){
alert('Please check the comments before making any changes.');
document.myForm.txtArea.focus();
}
}