Give focus to child with parent submit

H

hforman1

The parent window has a button that opens the child window AND submits
a form on the parent window. The child window opens, but the parent
window reloads on top of it. I want the child window to have focus.

I've tried this function on the parent page:

function MM_focusWindow(theURL,winName,features) {
var popUpWin = open(theURL,winName,features);
popUpWin.focus()

}

I call the function from the body tag of the parent window using the
OnLoad event. It only seems to work if the child window is already
open, i.e. when the button is clicked more than once.
Can anyone suggest how I can give the child focus?

Thanks!
 

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

Forum statistics

Threads
473,744
Messages
2,569,484
Members
44,903
Latest member
orderPeak8CBDGummies

Latest Threads

Top