window.opener

D

Daniel Andersen

Hi,

Does anyone here know of a way of tracking the window that launched a popup
window besides using window.opener? The problem i'm having is that the
popup window submits a form within itself before wanting to return the data
to the launching page, and unfortunately in IE5 window.opener is undefined
after the form is submitted, so i need some sort of workaround to make the
page work in IE5.
Thanks,

Daniel
 
P

Peter

Call a function within the opener (on Clicking a submit image or something
on your pop up window) which pulls the data into itself then submits the
form of the pop up page, then closes the pop up page.

E.G.
Put this in your opener page...

var popUp;

function openPopUp(strPage) {
popUp = window.open(strPage, etc,etc...
}

function finishIt() {
var x = popUp.document.form.txtField1.value;
var y = popUp.document.form.txtField2.value; etc, etc

popUp.document.form.submit();

popUp.close();
}

Put this in your pop up page...

<a href="javascript:window.opener.finishIt();"><img
src="submit.gif"></a>

Hope that helps you.

Peter.
 

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

Similar Threads


Members online

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,071
Latest member
MetabolicSolutionsKeto

Latest Threads

Top