This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes HTML, CSS and JavaScript and the fly likes Communicate from a Popup Window back to the Parent Window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Communicate from a Popup Window back to the Parent Window" Watch "Communicate from a Popup Window back to the Parent Window" New topic
Author

Communicate from a Popup Window back to the Parent Window

Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
I really need help badly. I have searched for a solution and tried many different ways.

My parent window wants to access the value of a text field in its popup window. The file name of the popup window is kept in a configuration file. I have managed to navigate from the parent window and popup a child window. The child window has a form, which has a text field and a button to submit the form. I just could not get the JavaScript specification in the popup window right. How do I pass the value that is entered by users in the text field to the buttion? So that the value can be picked up by the JavaScript in the popup window? Note that my browser thinks that the attribute called "var" is invalid in the input text field.

Here is the code for the parent window:

Here is the code for the popup window:

[ September 27, 2005: Message edited by: Bear Bibeault ]
Eric Pascarello
author
Rancher

Joined: Nov 08, 2001
Posts: 15376
    
    6
onclick="window.opener.document.FormName.ElementName.value=document.formName.elementName.value"

Eric
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Communicate from a Popup Window back to the Parent Window
 
Similar Threads
Passing Value From Parent to Popup Window by Pressing the Enter Key
Passing Value From Popup Window To Parent Window
Passing a Value from Popup Window back to the Parent Window
How to Get JSF inputText Value to JavaScript?
Issue in populating field in parent window