弹出框是框架,将框架中的值返回给父窗口
如题:
父页面 a.asp 上有个按钮和一个input框,我点击按钮,弹出一个框架类型的页面b.asp
框架页b.asp 包括2个页面c.asp为查询页面, d.asp为结果页面(c.asp查询的结果),d页面上有个确定按钮,
现在我想点击d页面的确定按钮的时候,把d页面上的值返回给父页面a.asp,并且关闭弹出框b.asp页面。
高手帮忙,我没能实现,一直提示window.opener为空或者不是对象
-----------------------------------------------
a.asp
function popwindow()
{
window.open("../payment/test.asp","LayerWindow", sFeature);
}
------------------------------------------------
b.asp
<frameset cols="168,10,*" border="0" framespacing="0" frameborder="0" id="lkoamenu_frame" name="lkoamenu_frame" >
<frame src="c.asp" frameborder="no" scrolling="auto" name="leftFrame" marginwidth="0" marginheight="0" noresize>
<frame src="../middle.asp" frameborder="no" scrolling="auto" name="middle" marginwidth="0" marginheight="0" noresize>
<frame src="d.asp" frameborder="NO" name="main" id="mains">
</frameset>
------------------------------------------------
d.asp
function ok1(){
window.opener.aaa();
window.close();
}
function aaa()
{
ofrmSearch.ProductID.value = "222222222"
ofrmSearch.ProductName.value = "3333333333"
}
-----------------------------------------------------
提示就报错,window.opener为空或者不是对象
我知道错误大概是winopen没认d.asp为他的子窗口,可就不知道该怎么改,帮忙!