• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing parameters between pop window JSP page and parent JSP page

 
Kaustubh Chaudhari
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic