window.showModalDialog和window.open关闭子页面时刷新父页面
2008-08-08 11:37
423 查看
父窗体打开页面的javascript
function GoToPage(id)
{
var title="title";
var url="xxxxx.aspx?ID="+id+"&Radom="+Math.random();;
var Width="700";
var Height="600";
var arguemnts = new Object();
arguemnts.window = window;
if (document.all&&window.print)
{
window.showModalDialog(url,arguemnts,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;");
}
else
{
window.open(url,"","width=" + Width + "px,height=" + Height + "px,resizable=1,scrollbars=1");
}
}
子页面执行代码后:
Response.Write("<script language='javascript'>window.dialogArguments.window.location = window.dialogArguments.window.location;</script>");
Response.Write("<script>self.close();</script>");
如果是window.open打开的:
Response.Write("<script language='javascript'>window.opener.location.热reload();</script>") ;
Response.Write("<script language='javascript'>window.opener=null;window.close();</script>");
function GoToPage(id)
{
var title="title";
var url="xxxxx.aspx?ID="+id+"&Radom="+Math.random();;
var Width="700";
var Height="600";
var arguemnts = new Object();
arguemnts.window = window;
if (document.all&&window.print)
{
window.showModalDialog(url,arguemnts,"dialogWidth:" + Width + "px;dialogHeight:" + Height + "px;center:yes;status:no;scroll:yes;help:no;");
}
else
{
window.open(url,"","width=" + Width + "px,height=" + Height + "px,resizable=1,scrollbars=1");
}
}
子页面执行代码后:
Response.Write("<script language='javascript'>window.dialogArguments.window.location = window.dialogArguments.window.location;</script>");
Response.Write("<script>self.close();</script>");
如果是window.open打开的:
Response.Write("<script language='javascript'>window.opener.location.热reload();</script>") ;
Response.Write("<script language='javascript'>window.opener=null;window.close();</script>");
相关文章推荐
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面【转】
- window.showModalDialog和window.open关闭子页面时刷新父页面【转】
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window.showModalDialog和window.open关闭子页面时刷新父页面
- window的open方法和showModalDialog方法关闭时刷新父窗体
- 向页面注册一过脚本,显示提示,关闭页面,刷新后面的页面(后面的页是window.open出来滴当前页)
- 从A页面单击 window.open 打开了B页面 B页面没有关闭再次点击A页面的这个链接, 让他刷新B页面而不是在打开一个B页面可以做到吗?
- window.open()关闭子页面父页面不刷新的解决方法
- window.showModalDialog方式/模式窗口数据不刷新(缓存)问题/模式窗口中,链接弹出新窗口问题/无提示关闭页面的方法
- js关闭window.open()并且刷新
- window.open 之后刷新父页面
- 刷新父页面(window.open打开的页面)
- javascript刷新页面 (子窗口 window.open iframe)
- window.showModalDialog关闭子页面刷新父页面