matty
Scripting Guru
Posts: 8336 Reputation: 109
39 / /
Joined: Dec 2002
Status: Away
|
RE: Close Javascript Window
code: <script>
var newwindow = '';
function popitup(url)
{
if (!newwindow.closed && newwindow.location)
{
newwindow.location.href = url;
}
else
{
newwindow=window.open(url,'name','height=200,width=150');
if (!newwindow.opener) newwindow.opener = self;
}
if (window.focus) {newwindow.focus()}
return false;
}
</script>
<body onLoad="popitup('upload.html')">
<a href="#" onClick="javascript:popitup('javascript:window.close()')">close</a>
</body>
JavaScript - Cross window scripting
This post was edited on 03-05-2005 at 06:50 PM by matty.
|
|