Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > Close window with target?

Reply
Thread Tools

Close window with target?

 
 
Targa
Guest
Posts: n/a
 
      06-18-2004
How can I set a target for this script? It launches from an Iframe and I
need the parent page to refresh when it closes

<!-- Go to Invoice and Close Popup Window-->
<script language="JavaScript"><!--
function supressError() {
return true;
}

function load(url) {
window.onerror = supressError;
opener.location.href = url;
setTimeout('self.close()',100);
}
//--></script>

Thanks!



 
Reply With Quote
 
 
 
 
Vincent van Beveren
Guest
Posts: n/a
 
      06-18-2004
> How can I set a target for this script? It launches from an Iframe and I
> need the parent page to refresh when it closes


I don't really know what you are looking for, but maybe this can help
you:

The parent of an IFRAME is window.parent, the opener of a popup window
is 'window.opener' So, the document in which the IFRAME is embedded
should be refereable from the popup window by opener.parent.

Good luck,
Vincent


 
Reply With Quote
 
 
 
 
Targa
Guest
Posts: n/a
 
      06-18-2004
That did it - Thanks!



"Vincent van Beveren" <(E-Mail Removed)> wrote in message
news:40d29af7$0$36169$(E-Mail Removed)4all.nl...
> > How can I set a target for this script? It launches from an Iframe and I
> > need the parent page to refresh when it closes

>
> I don't really know what you are looking for, but maybe this can help
> you:
>
> The parent of an IFRAME is window.parent, the opener of a popup window
> is 'window.opener' So, the document in which the IFRAME is embedded
> should be refereable from the popup window by opener.parent.
>
> Good luck,
> Vincent
>
>




 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
How to close a TCP socket? (TCPSocket#close doesn't close it) IƱaki Baz Castillo Ruby 7 01-12-2010 01:32 PM
close all child windows when close the main window jrefactors@hotmail.com HTML 6 08-07-2008 09:10 AM
close current window using window.close() Shang Wenbin Javascript 10 09-02-2005 12:16 AM
close all child windows when close the main window jrefactors@hotmail.com Javascript 3 01-16-2005 10:06 PM
Self.close() window without the dialog close?Yes/NO Walter Beierdonck Javascript 1 04-30-2004 02:48 PM



Advertisments