Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing Value From Popup Window To Parent Window

 
Daniel Gee
Ranch Hand
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 202
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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?
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic