wood burning stoves*
The moose likes HTML, CSS and JavaScript and the fly likes Passing Value From Popup Window To Parent Window Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » HTML, CSS and JavaScript
Bookmark "Passing Value From Popup Window To Parent Window" Watch "Passing Value From Popup Window To Parent Window" New topic
Author

Passing Value From Popup Window To Parent Window

Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
I am using JSF. I try to pass a value that is entered by users back to a text field in the parent window. I think my problem is with the syntax of the JavaScript because I got script error:

document.forms[ ].elements[ ] is null or not an object.


The relevant code snippets are shown below. The web site does not accept one of the tag attributes that I entered; therefore, I put an underscore in that attribute - on_click.

The screen1.jsp is the parent window:

The externalFilePopup.jsp is the popup window:

The script error occurs when I click on this OK button.

Please point out the mistakes in my code. Thank you.
[ September 22, 2005: Message edited by: Daniel Gee ]
Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
I have made some modifications to the code in the popup window. The error reported in my previous posting is gone. But, I still have several problems:

1. syntax error in the popup window jsp page:
line 45, char 21, syntax error, ..., Do you want to continue running script on this page?

2. The popup window does not close after I click on the OK button that I coded in the popup window jsp.
3. The value that I entered in the popup window eventually gets passed back to the text field in the parent window only if I re-run the application.

The relevant JavaScript code snippets are:

What are the mistakes that I made?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing Value From Popup Window To Parent Window
 
Similar Threads
Refresh datatable
any popup calendar include in jsf
Communicate from a Popup Window back to the Parent Window
Passing a Value from Popup Window back to the Parent Window
How to Open JSF Page in Separate Browser Window