Hi,

I am sorry to hijack this thread but I have a similar question. I have a
parent form and upon clicking  a link, it opens up  a popup window to add
some form fields. When the user saves this form in the popup, a part of
parent window should get updated. How can I use the  popup window to call a
div of the parent form. Below I am giving a snippet of my jsp. the
javascript addEditAudit method will open up  a jsp and upon submitting the
form in the popup, the popup should update the <div id="details"></div>
part.

Any help in this matter would be greatly appreciated

     function addEditAudit(url) {
        window.open (url, "addEditWindow", "height=400, width=700");    
 }     
    </script>
        <head>
        <link rel="stylesheet" type="text/css" href="css/style.css" />
        </head>
        <s:i18n name="com.hmsonline.auditgui.web.Messages">
                <center>
                <div class="dataTableHeader"><s:text name="label.auditpiids"
/>${hmsId}</div>
                <s:form name="addEditAuditForm" action="SaveAuditsAction"
                        id="addEditAuditForm" method="POST" theme="simple">
                        <table align="center" class="dataTable" border="1">
                                <tr class="formField">
                                        <th><s:text name="audit.id" /></th>
                                        <th><s:text name="audit.type" /></th>
                                        <th><s:text name="audit.duedate" /></th>
                                        <th><s:text name="audit.source" /></th>
                                        <th><s:text name="audit.data" /></th>
                                        <th><s:text name="audit.comments" 
/></th>
                                        <th><s:text name="audit.status" /></th>
                                </tr>
                                <s:iterator value="auditRequestsGui" 
status="stat">
                                        <tr>
                                                <s:hidden 
name="auditRequestsGui[%{#stat.index}].id" />
                                                <td><s:property value="id" 
/></td>
                                                <td><s:property value="type" 
/></td>
                                                <td><s:property value="dueDate" 
/></td>
                                                <td><s:property value="source" 
/></td>
                                                <td>
                                                <table>
                                                        <s:iterator 
value="auditData" status="aData">
                                                                <tr>
                                                                        
<td><s:property value="key" />:</td>
                                                                        
<td><s:property value="value" /></td>
                                                                </tr>
                                                        </s:iterator>
                                                </table>
                                                </td>
                                                <td><s:textarea cols="15" 
rows="4" id="comment"
                                                
name="auditRequestsGui[%{#stat.index}].auditorComments">${auditorComments}</s:textarea>
                                                </td>
                                                <td>
                                                        <s:select 
name="auditRequestsGui[%{#stat.index}].status"
                                                                
id="auditRequestsGui[%{#stat.index}].status" list="statuses"
                                                                disabled="true" 
/>
                                                        <br/>
                                                         
javascript:addEditAudit('AddEditAuditRequestAction.action')
Add/Update 
                                                        <br/>
                                                         # Undo Changes 
                                                </td>
                                        </tr>
                                </s:iterator>
        <div  id="details">
                <div>
                        </table>
                        <div align="center">
                        <table>
                                <tr>
                                        <td><s:submit key="button.submit" 
cssClass="actionButton" /></td>
                                        <td><s:reset key="button.cancel" 
cssClass="actionButton" /></td>
                                </tr>
                        </table>
                        </div>
                </s:form></center>
        </s:i18n>
        </html>
</jsp:root>


-- 
View this message in context: 
http://www.nabble.com/-S2--why-is-javascript-executed-before-DOM-is-updated-tp14313561p23854865.html
Sent from the Struts - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@struts.apache.org
For additional commands, e-mail: user-h...@struts.apache.org

Reply via email to