[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Populate Data to Parent Window

Posted on 2011-04-28
3
Medium Priority
?
341 Views
Last Modified: 2012-05-11
Friends
IN our application There is a add new records button on my parent JSP which opens a child window and a user can select records on the child window using check boxes and the selected records on the child window need to be populated on the parent window jsp
Any idea how this can be achieved in js or jquery ?

0
Comment
Question by:ronan_40060
3 Comments
 
LVL 20

Accepted Solution

by:
chaitu chaitu earned 750 total points
ID: 35482241
 <BODY>
  <input type='button' value='addRecords' onclick="window.open('child.html')">
  <div id='div1'></div>
 </BODY>
</HTML>

CHILD.HTML
*******
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML>
 <HEAD>
    <script>
  function ex(val)
  {
	opener.div1.innerHTML=val
  }
    </script>
 </HEAD>

 <BODY>
 item1: <input type='checkbox' id='item1' VALUE='item1' onclick='ex(this.value)'>
  item2: <input type='checkbox' id='item2' VALUE='item2'  onclick='ex(this.value)'>
 </BODY>
</HTML>

Open in new window

0
 
LVL 38

Assisted Solution

by:Tom Beck
Tom Beck earned 750 total points
ID: 35482803
Another approach would be to use a modal popup with javascript or jquery rather than a child window. Here's one jquery example (many available). Click on "Simple Window Modal".

http://www.queness.com/resources/html/modal/jquery-modal-window.html
0
 
LVL 9

Author Closing Comment

by:ronan_40060
ID: 35735649
Thanks
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article demonstrates how to create a simple responsive confirmation dialog with Ok and Cancel buttons using HTML, CSS, jQuery and Promises
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…
Suggested Courses

834 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question