winmax999
11-04-2003, 10:01 PM
I have the following code which allow you to
(1) open a window if you press 'Click to open'
(2) close it if you press 'Closewin'
I found that step (1) and (2) will work fine if I try to window.open an ordinary html file. But if I'm opening an xml file (with stylesheet inside), step (1) works but step (2) fails to respond the close event. Could anyone please help?
Thanks!
<html>
<head>
<title>Testing Page</title>
<script language="Javascript1.2">
var zoomedWin = null;
function showWin(url)
{
zoomedWin = window.open("testing.html", "zoomedWin");
}
</script>
</head>
<body scroll="yes">
<a href="" onclick="zoomedWin.close();return false">
Closewin</a>
<p>
<A href="#" onclick="showWin(1);return false">Click to Open</A>
</body>
</html>
(1) open a window if you press 'Click to open'
(2) close it if you press 'Closewin'
I found that step (1) and (2) will work fine if I try to window.open an ordinary html file. But if I'm opening an xml file (with stylesheet inside), step (1) works but step (2) fails to respond the close event. Could anyone please help?
Thanks!
<html>
<head>
<title>Testing Page</title>
<script language="Javascript1.2">
var zoomedWin = null;
function showWin(url)
{
zoomedWin = window.open("testing.html", "zoomedWin");
}
</script>
</head>
<body scroll="yes">
<a href="" onclick="zoomedWin.close();return false">
Closewin</a>
<p>
<A href="#" onclick="showWin(1);return false">Click to Open</A>
</body>
</html>