Main > Popup > Popup > Close popup AND new URL in main?

Discussion in 'Javascript' started by Jens Peter Hansen, Jun 18, 2004.

  1. Hi
    From my main window I open a series of popup (one close - next opens)
    in a mockup for a registration proces.

    From the last popup, I want to click a buttom, so the popup closes and
    the URL in the original main window changes and the window get focus.

    Uses
    <script language="JavaScript"><!--
    name = 'mainwindow';
    //--></script>

    to target the main window - but I havn't succeeded in closing the
    popup.

    Any suggestions?
     
    Jens Peter Hansen, Jun 18, 2004
    #1
    1. Advertising

  2. Jens Peter Hansen

    Randy Webb Guest

    Jens Peter Hansen wrote:

    > Hi
    > From my main window I open a series of popup (one close - next opens)
    > in a mockup for a registration proces.
    >
    > From the last popup, I want to click a buttom, so the popup closes and
    > the URL in the original main window changes and the window get focus.
    >
    > Uses
    > <script language="JavaScript"><!--
    > name = 'mainwindow';
    > //--></script>
    >
    > to target the main window - but I havn't succeeded in closing the
    > popup.


    self.close();

    in the popup window.

    --
    andy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Randy Webb, Jun 18, 2004
    #2
    1. Advertising

  3. Randy Webb <> wrote in message news:<>...
    > > From the last popup, I want to click a buttom, so the popup closes and
    > > the URL in the original main window changes and the window get focus.
    > > but I havn't succeeded in closing the
    > > popup.

    >
    > self.close();
    >
    > in the popup window.


    Yes - with self.close() I can close the popup - but I can't figure out
    how to change the content in the main window at the same time.

    Please have a look at a small example I have placed at
    http://www.purhusnet.dk/popupsequence/ - in this example I do change
    content in main window, but the popup retains focus.

    regards jph
     
    Jens Peter Hansen, Jun 19, 2004
    #3
  4. Jens Peter Hansen

    Randy Webb Guest

    Jens Peter Hansen wrote:
    > Randy Webb <> wrote in message news:<>...
    >
    >>>From the last popup, I want to click a buttom, so the popup closes and
    >>>the URL in the original main window changes and the window get focus.
    >>>but I havn't succeeded in closing the
    >>>popup.

    >>
    >>self.close();
    >>
    >>in the popup window.

    >
    >
    > Yes - with self.close() I can close the popup - but I can't figure out
    > how to change the content in the main window at the same time.
    >
    > Please have a look at a small example I have placed at
    > http://www.purhusnet.dk/popupsequence/ - in this example I do change
    > content in main window, but the popup retains focus.
    >
    > regards jph


    <A HREF="./red.html" TARGET="hovedvindue"
    oncklick="setTimeout(closeIt,1000)">- red content</A>

    function closeIt(){
    self.close();
    }

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Randy Webb, Jun 19, 2004
    #4
  5. Thanks Randy - that works as can be seen on
    http:/www.purhusnet.dk/popupsequence (har to correct a typing error in
    oncklick)

    regards jph


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Jens Peter Hansen, Jun 19, 2004
    #5
  6. Jens Peter Hansen

    Randy Webb Guest

    Jens Peter Hansen wrote:
    > Thanks Randy - that works as can be seen on
    > http:/www.purhusnet.dk/popupsequence (har to correct a typing error in
    > oncklick)
    >


    When I go through it now, in Mozilla, I get two windows at the end,
    instead of one......


    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Randy Webb, Jun 19, 2004
    #6
  7. Correct - lucky me, I'm only producing a mockup so for a start it is OK
    that it's only working in IE. Smarter people than me must solve the
    Mozilla/Netscape issue later :)

    regards jph


    *** Sent via Devdex http://www.devdex.com ***
    Don't just participate in USENET...get rewarded for it!
     
    Jens Peter Hansen, Jun 19, 2004
    #7
  8. Jens Peter Hansen

    Randy Webb Guest

    Jens Peter Hansen wrote:
    > Correct - lucky me, I'm only producing a mockup so for a start it is OK
    > that it's only working in IE. Smarter people than me must solve the
    > Mozilla/Netscape issue later :)


    The reason it works in IE and not Mozilla is because IE lets you name an
    already open window on the fly, Mozilla doesn't.

    Also, you may want to read
    <URL: http://www.jibbering.com/faq/#FAQ4_24 >

    --
    Randy
    Chance Favors The Prepared Mind
    comp.lang.javascript FAQ - http://jibbering.com/faq/
     
    Randy Webb, Jun 19, 2004
    #8
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    6
    Views:
    8,871
    sateeshranga
    Aug 7, 2008
  2. Iñaki Baz Castillo
    Replies:
    7
    Views:
    893
    Iñaki Baz Castillo
    Jan 12, 2010
  3. Replies:
    3
    Views:
    423
    Chung Leong
    Jan 16, 2005
  4. Replies:
    2
    Views:
    481
  5. libsfan01
    Replies:
    4
    Views:
    231
    Georgi Naumov
    Aug 5, 2006
Loading...

Share This Page