Input text displays keys pressed even though it does not have focus
Posted on 2005-03-22
I have a sample HTML page, with two frames. Here is the code for focusTest.html:
<frameset rows="150,*" >
<frame name="frame1" src="goto.html" >
<frame name="frame2" src="goto.html" >
And here is the code for goto.html:
<input size=10 type="text" name="text1" >
After the page is loaded, click in the first input box, type couple of characters. Then click the SECOND test link, a Hello is alerted. At this time, the second test link has the input focus. If you hit ENTER now, alert occurs again.
But if you just type some alphanumeric keys, the FIRST edit box shows those chars, as if it has focus.
This does not happen if the FIRST test link is clicked.
How can I avoid this? I need the text box to accept and display chars only if it has focus. Or atleast, when a char is entered, the text box should get focus.
this is in IE6.0
Thanks in advance for your prompt help!!