File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Struts and the fly likes Submitting the parent jsp from a chile jsp Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Struts
Bookmark "Submitting the parent jsp from a chile jsp" Watch "Submitting the parent jsp from a chile jsp" New topic

Submitting the parent jsp from a chile jsp

vijay ks

Joined: Oct 27, 2005
Posts: 9
Below is the code for my application, i am entering value in the parent and click the delete button it pops up the child , when i cliking the Yes button , the parent page is submitting , but the text i enter is not populate in the form . Help needed

The following parent jsp

<script type="text/javascript">
function confirmDelete(){'./jsp/child.jsp','popupwindow','location=1,status=1,scrollbars=1,width=300,height=300');

<nested:form action="/displayqueries">
<nested:text property="name"/>
<input type="button" name="delete" value="Delete" onclck="confirmDelete()"/>


<script type="text/javascript" language="Javascript1.2">
function confirmSelection(val){
var openerForm = window.opener.document.forms[0];
openerForm.method = "post";


<table border="0" width="100" height="100">
<td align="right">
<img src="//" alt="action link icon" width="17" height="15" onclck='javascript:confirmSelection("Yes")'>Yes</td>
<td width="50%" align="left">
<img src="//" alt="action link icon" width="17" height="15" onclck='confirmSelection("No")'> No</td></tr>

Brent Sterling
Ranch Hand

Joined: Feb 08, 2006
Posts: 948
hmmmm...I see that in your child script you are dynamically setting the parent action and method. Has this approach worked for you in the past or have you seen examples of this? What I do in this case is to set the value of a hidden form field. Then when the page is submitted I detect that the value is set and forward back to an action that refreshes the page with the updated values.

- Brent
I agree. Here's the link:
subject: Submitting the parent jsp from a chile jsp
jQuery in Action, 3rd edition