This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one for details.
The moose likes Struts and the fly likes Passing parameters between pop window JSP page  and parent JSP page Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Passing parameters between pop window JSP page  and parent JSP page" Watch "Passing parameters between pop window JSP page  and parent JSP page" New topic
Author

Passing parameters between pop window JSP page and parent JSP page

Kaustubh Chaudhari
Greenhorn

Joined: Nov 15, 2007
Posts: 6
I have created 'parent.jsp' from which i want to call a pop up jsp page 'popup.jsp' and do some operation on that jsp. After that i want to pass resulting parameters of 'popup.jsp' screen back to the 'parent.jsp'. During this i don't want to maintain the previous form bean values of 'parent.jsp' as well as to show the resulting parameters of 'popup.jsp' on 'parent.jsp'. For both jsp pages i am using same form bean.

Is it possible to do without using AJAX? How?

Or i have to look any other alternative for this.
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
You can get at the parent document using JavaScript. I am not exactly sure what you need to do, but this might give you a start:


- Brent
Kaustubh Chaudhari
Greenhorn

Joined: Nov 15, 2007
Posts: 6
Sorry for inconvinience. I had made some mistakes in previous problem.
Here by i am correcting my problem.

Using Struts, I have created 'parent.jsp' from which i want to call a pop up jsp page 'popup.jsp' and do some operation on that jsp. After that i want to pass resulting parameters of 'popup.jsp' screen back to the 'parent.jsp'. During this i want to maintain the previous form bean values of 'parent.jsp' as well as to show the resulting parameters of 'popup.jsp' on 'parent.jsp'. For both jsp pages i am using same form bean.

Is it possible to do without using AJAX? How?

Or i have to look any other alternative for this
Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
Yes, you can do this. At least I think so because I don't fully understand what you want to accomplish. A more concrete example might help.

I have places in my code where I bring up a popup and then use JavaScript like that shown above to populate fields on the parent page. I also have places in my code where the popup saves or updates values in the database and then causes the parent page to refresh with the new values. To do this without loosing the current values of the page you have to submit the page and have special processing to redisplay the page.

- Brent
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Passing parameters between pop window JSP page and parent JSP page