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 JSF and the fly likes Passing a Value from 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 » Java » JSF
Bookmark "Passing a Value from Popup Window back to the Parent Window" Watch "Passing a Value from Popup Window back to the Parent Window" New topic
Author

Passing a Value from Popup Window back to the Parent Window

Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
Although it is about a popup window, I think my question is JSF specific.

I have successfully popped up a window. I am trying to pass a value that is enterend in a popup window text field and the popup window has a button.

I have seen an example code to pass a value from a popup window back to the parent window. In that example, the value to be passed back is set by clicking on a <hutputLink>. See below


and the JavaScript in that page is like:

My popup window is somewhat different. I have to provide a text field for users to fill out a value. And there is a button in the popup window to submit the value. The <h:inputtext> tag does not accept the "var" attribute. How do I modify the code to do what I am trying to achieve?

and I think my JavaScript in the popup window should be:
Bruce Jin
Ranch Hand

Joined: Sep 20, 2001
Posts: 666
What browser do you use? IE or firefox or...?


BJ - SCJP and SCWCD
We love Java programming. It is contagious, very cool, and lot of fun. - Peter Coad, Java Design

Crazy Bikes created by m-Power
Daniel Gee
Ranch Hand

Joined: Aug 29, 2003
Posts: 202
I use the Netscape and Mozilla.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Passing a Value from Popup Window back to the Parent Window
 
Similar Threads
need help in jquery
Communicate from a Popup Window back to the Parent Window
Passing Value From Parent to Popup Window by Pressing the Enter Key
Passing Value From Popup Window To Parent Window
button or link action not executed inside dataTable