弹出模态窗口关闭并刷新父窗体
2013-09-03 22:26
351 查看
框架页面
<div style="text-align: left; margin-left: -10px;">
<table style="height: 600px; width: 100%">
<tr>
<td id="all_3" style="width: 450px; height: 600px;">
<script type="text/javascript">
document.write('<iframe id="left" name="left" src="PostResponsebility.aspx" width="100%" height="100%" scrolling="auto" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
</script>
</td>
<td width="80%" align="center" valign="top" class="all_4" style="height: 100%;">
<script type="text/javascript">
document.write('<iframe id="Right" name="Right" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
</script>
</td>
</tr>
</table>
</div>
打开模态窗口
function AddOrg(DeptID) {
var height = screen.height - 200;
var width = screen.width - 350;
var winoption = "dialogHeight:" + height + "px;dialogWidth:" + width + "px;status:no;scroll:yes;resizable:yes;center:yes";
var surl = "OrganizationAdd.aspx?DeptID=" + DeptID;
var returnVal = false;
returnVal = window.showModalDialog(surl, window, winoption);
if (returnVal == "true") {
parent.location.href = parent.location.href;
}
parent.location.href = parent.location.href;
}
模态窗口后台代码
bool flag = actor.AddActor(SysID, RangeID, FullID, ParentID, ActorName, ActorDesc, IconID, ActorClass,DeptID);
if (flag==true)
{
Response.Write("<script language=javascript>");
Response.Write("var w;if (window.dialogArguments!=null) w=window.dialogArguments;");
Response.Write("window.returnValue=1;window.close()");
Response.Write("</script>");
}
<div style="text-align: left; margin-left: -10px;">
<table style="height: 600px; width: 100%">
<tr>
<td id="all_3" style="width: 450px; height: 600px;">
<script type="text/javascript">
document.write('<iframe id="left" name="left" src="PostResponsebility.aspx" width="100%" height="100%" scrolling="auto" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
</script>
</td>
<td width="80%" align="center" valign="top" class="all_4" style="height: 100%;">
<script type="text/javascript">
document.write('<iframe id="Right" name="Right" src="" width="100%" height="100%" scrolling="no" marginwidth="0" marginheight="0" frameborder="0"></iframe>');
</script>
</td>
</tr>
</table>
</div>
打开模态窗口
function AddOrg(DeptID) {
var height = screen.height - 200;
var width = screen.width - 350;
var winoption = "dialogHeight:" + height + "px;dialogWidth:" + width + "px;status:no;scroll:yes;resizable:yes;center:yes";
var surl = "OrganizationAdd.aspx?DeptID=" + DeptID;
var returnVal = false;
returnVal = window.showModalDialog(surl, window, winoption);
if (returnVal == "true") {
parent.location.href = parent.location.href;
}
parent.location.href = parent.location.href;
}
模态窗口后台代码
bool flag = actor.AddActor(SysID, RangeID, FullID, ParentID, ActorName, ActorDesc, IconID, ActorClass,DeptID);
if (flag==true)
{
Response.Write("<script language=javascript>");
Response.Write("var w;if (window.dialogArguments!=null) w=window.dialogArguments;");
Response.Write("window.returnValue=1;window.close()");
Response.Write("</script>");
}
相关文章推荐
- 弹出模态窗口关闭刷新父窗体
- 弹出模态窗口关闭刷新父窗体
- showModalDialog依次弹出两个模态窗口.两个窗口同时关闭并刷新父窗体
- 弹出模态窗口,关闭并刷新页面
- 关于模态弹出窗口刷新父窗体
- 弹出dialog 窗口; 以及在dialog 中关闭并且刷新父窗体的方法
- 关闭弹出模态窗口以后刷新父窗口
- 弹出模态窗口,关闭并刷新页面
- 弹出模态窗口,关闭并刷新页面
- 父窗弹出模态窗口子窗,取得父窗值,关闭子窗,同时刷新父窗并返回子窗值到父窗
- 关于模态弹出窗口刷新父窗体
- 使用js弹出模态窗口,提交保存数据后关闭模态窗口,刷新父窗口
- 页面弹出模态窗口showModelDialog,关闭窗口刷新父页面
- 关闭弹出窗口刷新父窗口
- [转]弹出窗口及关闭总结(window.open();Response.Redirect(); 模态) .
- 如何关闭弹出窗口,刷新父窗口?
- 关闭弹出窗口,刷新父窗口!!
- 【转】子窗体刷新父窗体使用接口模式 父窗口关闭子窗口
- 怎样将弹出的模式窗口关闭并刷新父窗体?
- #region的快捷键+++从一个页面中弹出一个新窗口,当新窗口关闭时刷新原窗口!