What happened to the Messenger Plus! forums on msghelp.net?
Shoutbox » MsgHelp Archive » Skype & Technology » Tech Talk » Close Javascript Window

Close Javascript Window
Author: Message:
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. Close Javascript Window
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. :P
[Image: top.gif]
03-04-2005 02:53 AM
Profile PM Web Find Quote Report
ShawnZ
Veteran Member
*****

Avatar

Posts: 3146
Reputation: 43
32 / Male / Flag
Joined: Jan 2003
RE: Close Javascript Window
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...
Spoiler:
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
the game.
03-04-2005 03:30 AM
Profile PM Web Find Quote Report
RaceProUK
Elite Member
*****

Avatar

Posts: 6073
Reputation: 57
39 / Male / Flag
Joined: Oct 2003
RE: Close Javascript Window
If that doesn't work, try uploadWindow.close()

* RaceProUK likes OO
[Image: spartaafk.png]
03-04-2005 10:05 AM
Profile PM Web Find Quote Report
DJeX
Veteran Member
*****

Avatar


Posts: 1138
Reputation: 11
– / Male / –
Joined: Jul 2003
O.P. RE: Close Javascript Window
None of thos work, :S
[Image: top.gif]
03-05-2005 05:58 AM
Profile PM Web Find Quote Report
matty
Scripting Guru
*****


Posts: 8336
Reputation: 109
39 / Male / Flag
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.
03-05-2005 06:46 PM
Profile E-Mail PM Find Quote Report
« Next Oldest Return to Top Next Newest »


Threaded Mode | Linear Mode
View a Printable Version
Send this Thread to a Friend
Subscribe | Add to Favorites
Rate This Thread:

Forum Jump:

Forum Rules:
You cannot post new threads
You cannot post replies
You cannot post attachments
You can edit your posts
HTML is Off
myCode is On
Smilies are On
[img] Code is On