单击提交按钮时如何关闭jquery对话框(提交按钮位于对话框内)

时间:2022-12-04 19:13:35

i have struts2 form inside a jquery dialog box, when i submit my form inside that dialog box my Struts2 action is performing but that pop up jquery dialog box is not closing.

我在jquery对话框中有struts2表单,当我在该对话框中提交我的表单时,我的Struts2操作正在执行,但弹出的jquery对话框没有关闭。

How can i close that dialog box when![enter image description here][1] i submit my form?

如何关闭该对话框![在此处输入图像说明] [1]我提交表单?

 <table>
                    <tr>
                        <td>
                        <td align="center" >
                            <sj:head jqueryui="true" jquerytheme="cupertino" />

                            <sj:dialog 
                                id="mybuttondialog" 

                                autoOpen="false" 
                                showEffect="fadeIn" 
                                hideEffect="fadeOut" 
                                modal="true" 
                                title="Rename"
                                >
                                <s:form action="EditDayActionUserTemplate" id="formId323">
                                    <table style="height:48px;width: 100%;" cellpadding="0" cellspacing="0" border="0">
                                        <tr>
                                            <td colspan="2"  align="center">
                                                <input type="hidden" name="dayId" value="<%=daycont%>"/> 
                                                <input type="hidden" name="workoutId" value="<%=trid%>"/> 
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="50%" align="right"><font size="6px">Date</font></td>
                                            <td width="50%"> <sj:datepicker id="datghfe4" name="date" value="%{#parameters['date']}" label="Select Date" appendText=" (dd.MM.yy)" displayFormat="dd.M.yy"/></td>
                                        </tr>   
                                        <tr>
                                            <td>&nbsp;</td>
                                            <td align="right"><sj:submit formIds="formId323" id="sdfdss3" button="true" value="Rename" targets="rightmiddiv"></sj:submit></td>
                                            </tr>
                                        </table>
                                </s:form> 
                            </sj:dialog>
                            <sj:submit 
                                openDialog="mybuttondialog" 
                                value="Rename" 
                                button="true"

                                />
                        </td>

                    </tr>
                </table>

1 个解决方案

#1


0  

Whenever you need to close the dialog box (programmatically I suppose) call the dialog method with argument close. Like this

每当你需要关闭对话框(我想以编程方式)时,请使用参数close来调用对话框方法。喜欢这个

$('#mybuttondialog').dialog('close');

Check this page for more info.

查看此页面了解更多信息。

#1


0  

Whenever you need to close the dialog box (programmatically I suppose) call the dialog method with argument close. Like this

每当你需要关闭对话框(我想以编程方式)时,请使用参数close来调用对话框方法。喜欢这个

$('#mybuttondialog').dialog('close');

Check this page for more info.

查看此页面了解更多信息。