Click to See Complete Forum and Search --> : focus()


locutus1979
04-05-2003, 02:53 PM
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,

khalidali63
04-05-2003, 03:40 PM
Take a look at this link.if you select the radio button "other" then foocus is atuomatically at the text field

http://68.145.35.86/temp/TextBoxFocus.html

Hope this helps

Cheers

Khalid

locutus1979
04-05-2003, 03:56 PM
As it turnd out all I had to do was have it set to onblur="verifynumberformat(myText)" as opposed to onChange="verifynumberformat(myText)"
and have in the function mytext.focus();
Thanks for the help!

Jen