Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Focus on Parent Hides Popup

Status
Not open for further replies.

quinnipiac0807

Programmer
Oct 25, 2004
38
US
I have a parent form that I have set the focus to a certain textbox. The focus works fine, but the problem is, when I open the popup using window.open(), it resets the focus to the same textbox again hides the popup behind the parent window. Is there any way around this?

Thanks in advance.
 

When are you calling the code to set the focus on the textbox?

Dan


[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
I've tried both setting it in the Body tag on the onLoad event. And I've also tried to just do it with javascript right after the HTML for the textbox.
 

Hmm... so your main window has an onload event handler that focusses the textbox (which works fine)... and when you then open a popup, the popup loses focus because the textarea is focussed again?

It's odd that the textarea is being focussed when the popup is opened when you don't mention anything about an onblur, etc. Can you post your code?

Dan



[tt]D'ya think I got where I am today because I dress like Peter Pan here?[/tt]
[banghead]

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top