当前位置: 代码迷 >> ASP >> 框架刷新的有关问题
  详细解决方案

框架刷新的有关问题

热度:597   发布时间:2012-02-02 23:57:14.0
框架刷新的问题
我的框架是上下两层的mainFrame和bottomFrame    
我在main中选择一个数据,添加到数据库,并在bottm中显示出来    
我想问的是
1、在添加完成怎么刷新bottm的页面,使它显示刚添加的记录
2、怎么跳出框架的页面    
 
 
框架集的代码如下:    
<frameset     rows= "106*,80 "     cols= "* "     framespacing= "2 "     frameborder= "yes "     border= "2 ">    
      <frame     src= "kuin1.asp?id= <%=request( "id ")%> &id3= <%=request( "id3 ")%> "     name= "mainFrame "     scrolling= "auto ">    
      <frame     src= "kuin2.asp?id= <%=request( "id ")%> "     name= "bottomFrame "     scrolling= "auto "     >    
</frameset>

------解决方案--------------------
在插入语句的后面加入:
top.bottomFrame.location.reload()

------解决方案--------------------
parent.bottomFrame.location.reload()
------解决方案--------------------
UP
------解决方案--------------------
1、刷新bottm的页面:在处理提交后加上
Response.Write( " <script> parent.bottomFrame.location=parent.bottomFrame.location; </script> ")
如果form action的target已经不是窗口内的任何frame了,则try:
Response.Write( " <script> if (window.opener && !window.opener.closed)window.opener.parent.bottomFrame.location=window.opener.parent.bottomFrame.location; </script> ")

2、跳出框架的页面
<SCRIPT language= "javascript "> <!--
if(top.location!=self.location)top.location=self.location;
//--> </SCRIPT>
------解决方案--------------------
set conn=nothing
Response.Write( " <Script> parent.bottomFrame.location.reload() </Script> ")
response.redirect "kuin1.asp?id= "&request( "id2 ")& "&id3= "&request( "id3 ")& " "
  相关解决方案