我用了window.opener.location.reload()刷新父窗口,父窗口是闪了一下,那说明reload是已经执行了,但是父窗口没有发生变化,怎么办?  如果不传递参数,可以刷新,但是加上参数就不行了 
    
  说明:我的子窗口改变了数据库的内容,父窗口里面有些显示颜色的格子是根据数据库里面的东西来判断的。但是数据库改了,父窗口还是没反应。还的手动刷新颜色才变,这样不行啊,怎么办啊   
    
  求大家帮忙想想这是怎么回事啊?? 
   <script language="javascript">
     alert("数据保存成功!")
 window.opener.location.reload("celiangshebeifengcun.asp?search="&Session("search")&"&keyword="&Session("keyword")&"&page="&Session("page")&"&order1="&Session("order1")&"&order2="&Session("order2")&"&order3="&Session("order3")&"&order4="&Session("order4")&"&order5="&Session("order5")); //刷新父窗口中的网页
   </script>

解决方案 »

  1.   

    你试试这样行不行:window.opener.location.href = "celiangshebeifengcun.asp?search=" & Session("search") & "&keyword=" & Session("keyword") ....."
      

  2.   

    reload是刷新不可以改变URL
    要传递参数可以用window.opener.location.href = .....或window.opener.location.replace(....)(replace不会生成新的历史记录)
      

  3.   

    还有,在 JS 中连接字符串的时候最好不要使用 "&" 这个符号,因为它和 "^" 是用作异或运算的,最好还是使用 "+"
      

  4.   

    LZ框架的应该用window.parent(指向父窗口)不是window.opener(指向打开该窗口的窗口)
      

  5.   

    如果不传递参数,可以刷新,但是加上参数就不行了 ,
    window.parent(指向父窗口)也还是不行
      

  6.   

    window.parent.location.replace("celiangshebeifengcun.asp?search=" + Session("search") + 
    "&keyword=" + Session("keyword") + 
    "&page=" + Session("page") + 
    "&order1=" + Session("order1") + 
    "&order2=" + Session("order2") + 
    "&order3=" + Session("order3") + 
    "&order4=" + Session("order4") + 
    "&order5=" + Session("order5") + 
    "&rnd=" + (new Date()).getTime() //防止浏览器缓存效果
    );
      

  7.   

    LZ检查一下连接后的地址
    "celiangshebeifengcun.asp?search=" + Session("search") + 
    "&keyword=" + Session("keyword") + 
    "&page=" + Session("page") + 
    "&order1=" + Session("order1") + 
    "&order2=" + Session("order2") + 
    "&order3=" + Session("order3") + 
    "&order4=" + Session("order4") + 
    "&order5=" + Session("order5")
    是否有错误有可能是Session的返回值不对
      

  8.   

    传递过去,网页URL只有celiangshebeifengcun.asp,后面参数都没有
      

  9.   

    一个例子:1、index.asp 代码如下:<a href="javascript:window.open('test.asp');">test.asp</a>2、test.asp 代码如下:
    <%
    response.write("<script language='javascript'>alert('数据保存成功!');window.opener.location.replace('celiangshebeifengcun.asp?search="&Session("search")&"&keyword="&Session("keyword")&"&page="&Session("page")&"&order1="&Session("order1")&"&order2="&Session("order2")&"&order3="&Session("order3")&"&order4="&Session("order4")&"&order5="&Session("order5")&"');window.close();</script>")
    %>