window.opener problem...

T

TugaMadrid

Hello!

I have a window to wich I want to send a value to its form.
From this window I open a popup window with window.open(...).

The new pop-up window contains a hidden frame (Table)...and thats from
this hidden table that I want to send some value to the original
window.

function go(of){

//alert(of);
alert(window.opener); this gives me undefined
alert(parent.location); this gives me the URL of the pop up window
where the hidden iframe is contained(not the original one)


window.opener.document.form.field.value="of";

window.opener.close()

}

Question:Why does the window.opener is undefined?Where does the
informacion get lost?

Thanks
 
L

Lee

TugaMadrid said:
Hello!

I have a window to wich I want to send a value to its form.


The new pop-up window contains a hidden frame (Table)...and thats from
this hidden table that I want to send some value to the original
window.

function go(of){

//alert(of);
alert(window.opener); this gives me undefined
alert(parent.location); this gives me the URL of the pop up window
where the hidden iframe is contained(not the original one)


window.opener.document.form.field.value="of";

window.opener.close()

}

Question:Why does the window.opener is undefined?Where does the
informacion get lost?

Within a frame, "window" refers to that frame.
"parent" refers to the popup window containing the frame
You want the opener of that popup window.
You should be able to figure it out from there.


--
 
T

TugaMadrid

TugaMadrid said:












Within a frame, "window" refers to that frame.
"parent" refers to the popup window containing the frame
You want the opener of that popup window.
You should be able to figure it out from there.

--- Ocultar texto citado -

- Mostrar texto citado -

Thanks for the tip but I already have it working:)

Instead of trying to send the informacion directly to the first
window , first I sent it on step back(to the second window) and only
then re-send it to the first one!!Thanks anyway:)
 

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,769
Messages
2,569,582
Members
45,065
Latest member
OrderGreenAcreCBD

Latest Threads

Top