focus()

admin

Administrator
Staff member
Ok this is going to soind really stupid but I can't seem to get the focus() to work for me. I'm running Internet Explorer 6.0.26 and I was wondering if theis even supports focus() I have a text box and when click onto another element in the form it check to make sure that there is a number in the field and diplays a message to change it to a numeric format if it's not. Now I want it set the focus back to the original text box so basically the person can't leave that text box until there is an entry with a number format in it. I've tried

txtMyText.focus();
document.formname.txtMyText.focus();

Can anyone tell where I'm going wrong?

Thanks,
 
Top