pass the parent window handle as the second parameter for showModalDialog:showModalDialog("child.aspx",window);inside "child.aspx": <script language="javascript"> function window.onunload() { dialogArguments.location.reload(true); } </script> or inside "child.aspx": <script language="javascript"> function window.onunload() { window.returnValue = true; } </script>then in the parent window: var ret = showModalDialog("child.aspx",null); if (ret) window.location.reload(true);
<script language="javascript">
function window.onunload()
{
dialogArguments.location.reload(true);
}
</script>
or
inside "child.aspx":
<script language="javascript">
function window.onunload()
{
window.returnValue = true;
}
</script>then in the parent window:
var ret = showModalDialog("child.aspx",null);
if (ret)
window.location.reload(true);
我是用showModalDialog("child.aspx",null);弹出子窗体的,
用上面的方法返回,老说找不到对象
window.location.reload(true);
opener.location.reload();—————————————————————————————————
┏━★━━◆━━★━┓
♂欢|◢CSDN◣|使♂ ▲自由保存帖子,浏览,关注检测
┃迎|◥论坛助手◤|用┃ ▲完善的CSDN客户端工具
┗━☆━━◇━━━☆┛ ▲自动添加签名......让你更快,更爽,更方便地上CSDN...
http://www.csdn.net/expert/topic/573/573604.xml
http://www.chinaok.net/csdn/csdn.zip