Close Javascript Window - Printable Version
-Shoutbox (https://shoutbox.menthix.net)
+-- Forum: MsgHelp Archive (/forumdisplay.php?fid=58)
+--- Forum: Skype & Technology (/forumdisplay.php?fid=9)
+---- Forum: Tech Talk (/forumdisplay.php?fid=17)
+----- Thread: Close Javascript Window (/showthread.php?tid=39496)
Close Javascript Window by DJeX on 03-04-2005 at 02:53 AM
How would I close a JavaScript popup window with the name upload?
I know window.close() closes the current window your on but I need to close a window called upload.
I need to close it because after my upload code is done I need to close the upload indicator screen. Which is a popup that says Uploading when you start the upload. It needs to be close automatically when the upload is done.
P.S. Thank you all for anwsering my past 3 questions. I know they may sound stupid or noobish but that’s because I’m still learning. You have been a big help. When I’m done I will surely post a link to my site that I’m working on so you can see where all your hard work went to.
RE: Close Javascript Window by ShawnZ on 03-04-2005 at 03:30 AM
you need to open the window into a varible like so:
uploadWindow = window.open( parameters )
then, use this to close the window:
window.close(uploadWindow)
im a little rusty with js, so im not sure if that exact script works...
RE: Close Javascript Window by RaceProUK on 03-04-2005 at 10:05 AM
If that doesn't work, try uploadWindow.close()
* RaceProUK likes OO
RE: Close Javascript Window by DJeX on 03-05-2005 at 05:58 AM
None of thos work,
RE: Close Javascript Window by matty on 03-05-2005 at 06:46 PM
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="javascriptopitup('javascript:window.close()')">close</a>
</body>
JavaScript - Cross window scripting
|