通过JavaScript保存后是否关闭模式对话框(窗体窗口)?
我有一个表单可以通过这样的链接在DispMode中打开:通过JavaScript保存后是否关闭模式对话框(窗体窗口)?,javascript,forms,list,sharepoint,Javascript,Forms,List,Sharepoint,我有一个表单可以通过这样的链接在DispMode中打开:https://mysite/tools/EmployeeList/SitePages/StartEL.aspx?&launch=128&launchlist=Zutrittsberechtigung&launchmode=disp 问题是,当我点击“Interflex”(保存)时,表单保存并用窗口重新打开页面。这是因为Interflex按钮具有以下JavaScript行: NWF$("button, .stdsubmit").click
https://mysite/tools/EmployeeList/SitePages/StartEL.aspx?&launch=128&launchlist=Zutrittsberechtigung&launchmode=disp
问题是,当我点击“Interflex”(保存)时,表单保存并用窗口重新打开页面。这是因为Interflex按钮具有以下JavaScript行:
NWF$("button, .stdsubmit").click();
我希望表单在保存后关闭,但我不知道如何实现这一点。我花了6个小时来解决这个问题,但我觉得很简单(我还没有找到答案)。我尝试了window.close()
和window.frameElement.commonModalDialogClose()代码>和
SP.UI.ModalDialog.commonModalDialogClose(SP.UI.DialogResult.OK,1)代码>没有成功
有人能告诉我,表单如何在保存后自动关闭(不刷新整个页面,因为这样会再次打开它)?如果使用NINTEX表单,可以使用下面的代码关闭对话框
NWF$(this).dialog('close');
参考:
如果仍然不起作用,请尝试使用下面的代码
window.location.href=window.location.href;
或
parent.location.href=parent.location.href;