请问在IE最小化时是否可以用open(url)弹出一个新窗口?(急救)
我的想法
是在一个frameset中用左边的页面定时的navigate右边的ASP页面
而右边的ASP页面查找数据库,一旦找到有用信息就open一个页面(即使在整个ie最小化时也可以弹出一个)。
可以在ie浏览时,右边的ASP就报错,即使只含有一条简单的语句
<%window.open("news.asp")%>
请问怎么处理?
是否不能用open?如果不能用,又应该怎么实现?
问题点数:50、回复次数:12Top
1 楼darkwing()回复于 2000-10-12 19:09:00 得分 0
不是啊!你好像没理解asp是服务器端运行的这句话含义!
asp的vbscript里没window对象可用
改为
<response.write "<scripts>window.open("news.asp")</scripts>"
试试。
Top
2 楼linyu(linyu)回复于 2000-10-13 00:22:00 得分 0
可以的。只是语句不对,你要使用以下格式:
<%if not rs.eof then%>
<scripts>window.open("news.asp")</scripts>
<%end if%>
Top
3 楼xuanleigg(亮亮)回复于 2000-10-13 02:00:00 得分 0
在一些社区用了类似的方法
可以实现有消息即时通知
可能用到了数据库(一个用户建立一则动态的表或是记录)Top
4 楼lz911(大石)回复于 2000-10-13 10:02:00 得分 0
我试了,还是不行,新窗口仍然弹不出来,请问是否有例子提供,不一定要访问数据库,只要实现我的想法就可以了
用left.asp定时navigate center.asp,而center.asp总是弹出一个新的ie窗口Top
5 楼linyu(linyu)回复于 2000-10-13 11:38:00 得分 50
运行index.htm
-- index.htm --------------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset cols="80,*" frameborder="YES" border="1" framespacing="1">
<frame name="leftFrame" scrolling="NO" noresize src="left.htm">
<frame name="mainFrame" src="main.asp">
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
-- left.htm --------------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<script>
<!--
n=1
function repage(){
n=n+1;
parent.mainFrame.location='main.asp?n='+n;
setTimeout("repage()",1000);
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" onload="repage()">
</body>
</html>
-- main.asp --------------
<%
n=request("n")
response.write n
if n=10 then
%>
<script>window.open("main.asp?n=77777777")</script>
<%end if%>Top
6 楼lz911(大石)回复于 2000-10-16 16:14:00 得分 0
能帮我该一下程序吗?它弹出一个窗口后就不弹了,怎么回事,是因为SetTimeout的缘故吗?
请务必帮我改一下,谢谢
--------------index.htm----------------------------------
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<frameset rows="80,*" cols="162,845*" frameborder="NO" border="0" framespacing="0">
<frame name="lefttop" scrolling="NO" noresize src="lefttop.htm" >
<frame name="top" scrolling="NO" noresize src="top.htm" >
<frame name="left" scrolling="NO" noresize src="left.asp">
<frame name="centerframe" src="center.asp">
</frameset>
<noframes><body bgcolor="#FFFFFF">
</body></noframes>
</html>
--------------left.asp----------------------------------
<html>
<head>
<title>left</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<scripte>
<!--
function repage()
parent.centerframe.location="center.asp"
setTimeout "repage()" ,30000
end function
SetTimeout "repage()",30000
-->
</scripte>
<body bgcolor="#FFFFFF" >
left
</body>
</html>
---------------------------center.asp---------------------------
<scripts>
<!--
window.open("errorpage.asp")
--></scripts>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin=0 leftmargin=0 bgcolor="#FFFFFF">
<p>center.asp</p>
<script>window.open("errorpage.asp")</script>
<p> </p>
</body>
</html>
Top
7 楼Bardo(巴顿(永远只有一个))回复于 2001-05-11 14:03:00 得分 0
参数写全了就行!!!!!Top
8 楼Bardo(巴顿(永远只有一个))回复于 2001-05-13 00:07:00 得分 0
center.asp 代码:::
<script language="javascript">
function OpenChat(){ remote = window.open("","remotewin","resizable=yes,status=yes,toolbar=no,menubar=no,location=no");
remote.location.href = "errorpage.asp";
if (remote.opener == null) remote.opener = window;remote.opener.name = "opener";}
</script>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin=0 leftmargin=0 bgcolor="#FFFFFF" onload="javascript:openMess();">
<p>center.asp</p>
<script>window.open("errorpage.asp")</script>
<p> </p>
</body>
</html>
Top
9 楼Bardo(巴顿(永远只有一个))回复于 2001-05-13 00:09:00 得分 0
上面两个函数名不一致!OpenChat openMess 改一下,Sorry!Top
10 楼Bardo(巴顿(永远只有一个))回复于 2001-05-13 00:10:00 得分 0
center.asp 正确代码:::
<script language="javascript">
function OpenMess(){ remote = window.open("","remotewin","resizable=yes,status=yes,toolbar=no,menubar=no,location=no");
remote.location.href = "errorpage.asp";
if (remote.opener == null) remote.opener = window;remote.opener.name = "opener";}
</script>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin=0 leftmargin=0 bgcolor="#FFFFFF" onload="javascript:openMess();">
<p>center.asp</p>
<p> </p>
</body>
</html>
Top
11 楼Bardo(巴顿(永远只有一个))回复于 2001-05-13 00:11:00 得分 0
center.asp 正确代码:::
<script language="javascript">
function OpenMess(){ remote = window.open("","remotewin","resizable=yes,status=yes,toolbar=no,menubar=no,location=no");
remote.location.href = "errorpage.asp";
if (remote.opener == null) remote.opener = window;remote.opener.name = "opener";}
</script>
<html>
<head>
<title></title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body topmargin=0 leftmargin=0 bgcolor="#FFFFFF" onload="javascript:OpenMess();">
<p>center.asp</p>
<p> </p>
</body>
</html>
Top




