How to make cursor back to a textarea or an iframe?

D

DL

I have an iframe for text data input, in the meantime, I have a button
(id=d2) that has an event trigger to open up another window to do
something else, once it is done for the pop-up window, when a user
goes back to the iframe for more typing/data input, there's a problem,
if he/she hits the tab key, it triggers the id of d2 again, pop up a
window again. Browser = IE7. I didn't notice this odd behavior in
the past, is it because the computer has been hacked hence the
keyboard is not functioning nomally but I've just tried two computers
with the same odd behavior. What's your thought?

Thanks.
 
S

SAM

Le 5/3/09 12:23 AM, DL a écrit :
I have an iframe for text data input, in the meantime, I have a button
(id=d2) that has an event trigger to open up another window to do
something else, once it is done for the pop-up window, when a user
goes back to the iframe for more typing/data input, there's a problem,
if he/she hits the tab key, it triggers the id of d2 again, pop up a
window again. Browser = IE7. I didn't notice this odd behavior in
the past, is it because the computer has been hacked hence the
keyboard is not functioning nomally but I've just tried two computers
with the same odd behavior. What's your thought?

Thanks.

<button id="d2" onclick="doThat(); this.blur()">

maybe ?
 
D

DL

Le 5/3/09 12:23 AM, DL a écrit :



<button id="d2" onclick="doThat(); this.blur()">

maybe ?

Thanks, Sam.
It worked for IE7 on an XP SP2 machine for one event call for one
button. When I added the
this.blur(); to another button after an event call in the same page,
the second one did not work (space key still brought up the second
event, which is a pop-up window. I suspect, it may not work for the
third one neither. Some scumbag may had a role in this.
 
D

DL

Le 5/3/09 12:23 AM, DL a écrit :



<button id="d2" onclick="doThat(); this.blur()">

maybe ?

Correction. The op had "tab key", it's a typo, it should have been
"space bar".
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top