wood burning stoves 2.0*
The moose likes HTML, CSS and JavaScript and the fly likes How to retrieve values from pop up in a 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 » Engineering » HTML, CSS and JavaScript
Bookmark "How to retrieve values from pop up in a parent window" Watch "How to retrieve values from pop up in a parent window" New topic

How to retrieve values from pop up in a parent window

ahamed irshad
Ranch Hand

Joined: Feb 26, 2010
Posts: 31

I have a table tag in my Pop up window, in which the row can be dynamically inserted. I need to know how to retrieve the values correspond to the table in Parent window. Can you guys guide me to achieve this. I can retrieve the input box values, but not the rows in table.


My pop up:

  • <form name="BREAKUP" method="POST" action="JavaScript:submitForm()">

    <table id="PDetailsTable" border="1">
    <td>Team Name</td>
    <td>Estimated Hours</td>
    <td>Actual Hours</td>

    <td > 1 </td>
    <td ><INPUT id="TEAM_NME" ></td>
    <td ><INPUT id="EST_HRS"></td>
    <td ><INPUT id="ACT_HRS"></td>
    <td >
    <select id="MNTH" onchange="" size="1">
    <option value="Jan">January</option>
    <option value="Feb">February</option>
    <option value="Mar">March</option>
    <option value="Apr">April</option>
    <option value="May">May</option>
    <option value="Jun">June</option>
    <option value="Jul">July</option>
    <option value="Aug">August</option>
    <option value="Sep">September</option>
    <option value="Oct">October</option>
    <option value="Nov">November</option>
    <option value="Dec">December</option>

    <button value="Add Details" class="submitBtn" onclick="JavaScript:addRow('PDetailsTable');">
    <span> Add Details  </span></button>

    <tr >
    <td ><img src="<%=imagesPath %>spacer.gif" height="10"></td>
    <tr >
    <td >
    <button TYPE="submit" class="submitBtn" onclick="JavaScript:submitForm();">
    <span> Submit  </span></button>
    <button value="Reset" class="submitBtn" onclick="JavaScript:resetForm();">
    <span> Reset </span></button>

    There are three javascript functions. I am using windows.opener in submiForm Function. I don't know how to send a list of values and retrieve in the parent windows

    You can do anything, but not everything
    Eric Pascarello

    Joined: Nov 08, 2001
    Posts: 15376
    Edit your post and use code tags.

    On the parent have a function, call it from the pop up window and pass the data to it.

    It is sorta covered in the JavaRanch Style Guide.
    subject: How to retrieve values from pop up in a parent window
    Similar Threads
    Problem setting TD tag innerHTML
    Requested Resource Not Found Error
    Getting null while trying to get value of Multiple list
    Creating-deleting rows in HTML(URGENT)
    How to store answer available in option form in database table?