首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > ASP >

框架刷新的有关问题

2012-02-02 
框架刷新的问题我的框架是上下两层的mainFrame和bottomFrame我在main中选择一个数据,添加到数据库,并在bot

框架刷新的问题
我的框架是上下两层的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 ")& " "

热点排行