File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Passing values from child to parent window

 
Collin Dugas
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have a requirement in which on click of a Assign button(Parent JSP containing a Text box and Assign button) a new child window(Child JSP) opens up displaying a list of values to select from. On selecting values and submitting the form the child window should close and the parent window be populated with the selected values.

I have been trying it for some time but could not do it. I would appreciate if anyone share any info if they have worked on this, any idea if this can be done or if the UI needs to be changed?

Thanks
 
James Ward
Ranch Hand
Posts: 263
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Collin Dugas wrote:Hi All,

I have a requirement in which on click of a Assign button(Parent JSP containing a Text box and Assign button) a new child window(Child JSP) opens up displaying a list of values to select from. On selecting values and submitting the form the child window should close and the parent window be populated with the selected values.

I have been trying it for some time but could not do it. I would appreciate if anyone share any info if they have worked on this, any idea if this can be done or if the UI needs to be changed?

Thanks


There can be several ways using javascript/jsp:

You can refresh the parent window using javascript from the child(popup window)


This technique can work, if your child window sends that data to server, and parent window while refreshing can retrieve it from the server.



You can pass the selected values from child window to parent window using javascript:

Make sure your parent window has a javascript function called setValues(...)


 
Collin Dugas
Ranch Hand
Posts: 91
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I got the solution on googling. It was a simple solution and I apolozise for posting such trivial questions. Will make sure to try out all things before asking for help here from now.
Thanks you
 
Kartik Tal
Ranch Hand
Posts: 100
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Collin,

Could you share the link with me as even i needed the same logic for my application.


Regards,
Kartik
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic