I have just encountered a problem that I am not able to figure out. Could you please help me out.....
The problem is that select() and focus() are not working in FF2.0 but works in IE7.
This is what the code is supposed to do:
1. I enter a age
2. If I enter non numerical data and then I tab out of the text area
3. An alert box pops up and tells me to correct the age.
4. On hitting ok it goes back to the age field.
But in FF its going to the next tag(the submit button).
This is the code:
var in_txt_age = document.form1.txt_age;
alert("Please enter a valid age");
[b]in_txt_age.focus(); //looks as if no need for focus() as I am able to edit the text with only select() in IE. Not working with FF.
in_txt_age.select(); //Not working with FF[/b]
<input type=text name=txt_age onblur="txt_age_onblur()" size=3 maxlength=3 />
<input type=button value=Submit />
Thanks for you time friends. :-)..............