954,600 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Sending information from popup to parent

Hi community,

I want to send data from a form on a popup to a form on its parent page. I have checked several approaches, but none of them is working with me. In the end, I've just tried to use an existing example from the web ( http://www.plus2net.com/javascript_tutorial/window-child3.php ) but even this is not working locally after copying the code from there, while it's working well when I try it directly on the page.

I have absolutely no clue what I am doing wrong. But after this experience I have my doubts, that it's not about the code. I hope somebody can help me.

----
EDIT:
I just found out, that this problem is specific for chrome, if I try this page on the web, it's working on chrome and firefox. But if I try it locally, it's just working on firefox. Does anybody have an idea how this could happen?

All the best,
Konrad

konradhoppe
Newbie Poster
12 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

Try referencing with:

opener.document.forms['f1'].p_name.value = document.forms[frm].c_name.value
Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

Try referencing with:

opener.document.forms['f1'].p_name.value = document.forms[frm].c_name.value

first of all, thanks for your help. But also this is not working on chrome, while it's working fine on firefox. It seems to be that the error is somewhere there, since the browser can't reach the line of the close statement, therefore the popup isn't able to close. Is there any issue with this opener in chrome, which firefox doesn't have?

konradhoppe
Newbie Poster
12 posts since Jan 2011
Reputation Points: 10
Solved Threads: 0
 

first discribing the error
and posting some code of the faulty lines
and lastly, where are you calling these commands from?
would rise your chances for solution a lot.

because you see there used to be a working hack for even closing a single (user opened) main window through script without a prompt by simply stating:
self = opener;
self.close(); //or something
[it doesn't work anymore - but not totally sure I haven't tried it since decade ago].

Troy III
Practically a Master Poster
609 posts since Jun 2008
Reputation Points: 120
Solved Threads: 80
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You
View similar articles that have also been tagged: