首先要在框架中添加一个隐藏页,如下:

<html>
<head>
< http-equiv="Content-Type" content="text/html; charset=gb2312">
<title></title>
< language="java">
re()
{
setTimeout("re()",30000);
ipopmsg.location.href=" search.asp"
}
</>
</head>
<body topmargin="0" leftmargin="0" ="re();" >
<height="1" scrolling="no" border="0" width="1" id="ipopmsg"  src=" blank"></i> 
</body>
</html>

这个页面的功能是没隔30000毫秒刷新一次search.asp这个页面。下面是search.asp的代码

<head>
<%
set rs=server.createobject("adodb.recordset")
sql
="select id from XXXX where xxxx"
rs.open sql,conn,
3,2
if not rs.eof then
%>
 
< language="java">
  newwin=open ("new.asp?id=
<%=rs("ID")%>","","top=50,left=50,width=420,height=262,menubar=no,status=no,scrollbars=yes,location=no,toolbar=no")
  newwin.focus();
 
</>
<%
end if
rs.close
set rs=nothing
connend
%>
</head>

这样如果有符合查询条件的消息,就会弹出new.asp页,同时把id传过去,下面就是弹出页怎么显示了,这里就不详细写了。

 

posted on 2007-09-03 12:13  -only-  阅读(404)  评论(0编辑  收藏  举报