Close window with target?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Targa

    #1

    Close window with target?

    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="JavaS cript"><!--
    function supressError() {
    return true;
    }

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

    Thanks!



  • Vincent van Beveren

    #2
    Re: Close window with target?

    > How can I set a target for this script? It launches from an Iframe and I[color=blue]
    > need the parent page to refresh when it closes[/color]

    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


    Comment

    • Targa

      #3
      Re: Close window with target?

      That did it - Thanks!



      "Vincent van Beveren" <vincent@provid ent.remove.this .nl> wrote in message
      news:40d29af7$0 $36169$e4fe514c @news.xs4all.nl ...[color=blue][color=green]
      > > 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[/color]
      >
      > 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
      >
      >[/color]



      Comment

      Working...