Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Submitting the parent jsp from a chile jsp

 
vijay ks
Greenhorn
Posts: 9
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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

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

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

Child.jsp

<html>
<head>
<script type="text/javascript" language="Javascript1.2">
function confirmSelection(val){
if(val=="Yes"){
var openerForm = window.opener.document.forms[0];
openerForm.action="autotcdisplayprocess.wss?delete=yes";
openerForm.method = "post";
openerForm.submit();
}
self.close();

}
</script>
</head>

<table border="0" width="100" height="100">
<tr>
<td align="right">
<img src="//w3.ibm.com/ui/v8/images/icon-link-action.gif" alt="action link icon" width="17" height="15" onclck='javascript:confirmSelection("Yes")'>Yes</td>
<td width="50%" align="left">
<img src="//w3.ibm.com/ui/v8/images/icon-link-action.gif" alt="action link icon" width="17" height="15" onclck='confirmSelection("No")'> No</td></tr>
</table>

</html>
 
Brent Sterling
Ranch Hand
Posts: 948
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic