Refocusing on a different window without losing form data?

M

MartyNg

I've never stumbled into this before. From Window A, I am using
window.open to open Window B. Window B has a form with lots of
elements. If the user loses focus of Window B somehow, and they click
the link on Window A to open Window B, all the form data is lost on the
refocus. I could have sworn I had this working before with the same
code. Do I have to conditionally check to see if Window B is already
open? (That way, I could just focus on Window B instead of reopening.

<a href="javascript:void(0);" onClick="var testWin =
window.open('testFormPage.asp?numItems=10','LocationWin','');
testWin.focus();">Open test form in new window</a>
 

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,768
Messages
2,569,574
Members
45,048
Latest member
verona

Latest Threads

Top