情况是这样的,a页面有个iframe ,这个iframe的src属性指向的是b页面,b页面有个按钮,单击它,弹出了页面c,用的是lhgdialog弹窗控件,调用方法如下:$.dialog({ id: 'test1', title: '添加注册信息',width: 480, height: 186, content: 'url:c.asp?lsreg=<%=request.QueryString("lsreg")%>', nofoot: true,skin:'skyblue'});现在要实现的效果是点击c页面的右上角的红叉关闭时如何刷新调用弹窗控件的页面,即b页面,注意不是a页面!写的代码如下c.asp页面: <body <%if request.QueryString("action")="close" then response.Write("onbeforeunload='closreload()'") end if%>> 然后是js 代码 function closreload()
{
//self.window.opener.locaction.reload();
// window.location .href=window.parent;
//parent.location.reload(); 刷新了a页面,而a的iframe属性默认的src指向的并不是b页面,所以无效
window.opener.location.href=window.opener.location.href;
//var win = top.window;
//if(win.opener) win.opener.location.reload(); } 上面的几行代码,我都试过了,可是都不见效,大家帮帮忙啊!
{
//self.window.opener.locaction.reload();
// window.location .href=window.parent;
//parent.location.reload(); 刷新了a页面,而a的iframe属性默认的src指向的并不是b页面,所以无效
window.opener.location.href=window.opener.location.href;
//var win = top.window;
//if(win.opener) win.opener.location.reload(); } 上面的几行代码,我都试过了,可是都不见效,大家帮帮忙啊!
//self.window.opener.locaction.reload();这个应该可以的
应该不是用的open,这句我试了,没反应
//self.locaction.reload();
parent.document.getElementById('bId').src = 'bsrc';
或
parent.frames['bname'].reload();
试试
var odialog=$.dialog({...]);
var odialogclose=odialog.close;
odialog.close=function(){
odialogclose.call(this);
window.location.href=window.location.href;
return false;
}