When does Window.open() call return control to caller?

Discussion in 'Javascript' started by Weyus, Jun 1, 2007.

  1. Weyus

    Weyus Guest

    All,

    I have a tricky set of AJAX functionality that involves a popup window
    and in order to keep the synchronization issues straight, I need to be
    sure that I understand something about the Window.open() call.

    If I have code that calls "window.open(url, name, features...)", does
    the calling code:

    a) block until the document (specified by url in the call) is fully
    loaded in that new window

    OR

    b) immediately continue processing once the window is initially
    displayed on the desktop?

    Another way to put this is: "Is a call to window.open() asynchronous
    with respect to the retrieval of the target url for that window?"

    Thanks,
    Wes Gamble
     
    Weyus, Jun 1, 2007
    #1
    1. Advertising

  2. Yes it is asynchronous. The execution of your calling code won't wait
    until the document in the remote window is "loaded" (for some
    definition of "loaded"). The separate window is essentially a separate
    thread.


    On May 31, 11:56 pm, Weyus <> wrote:
    > All,
    >
    > I have a tricky set of AJAX functionality that involves a popup window
    > and in order to keep the synchronization issues straight, I need to be
    > sure that I understand something about the Window.open() call.
    >
    > If I have code that calls "window.open(url, name, features...)", does
    > the calling code:
    >
    > a) block until the document (specified by url in the call) is fully
    > loaded in that new window
    >
    > OR
    >
    > b) immediately continue processing once the window is initially
    > displayed on the desktop?
    >
    > Another way to put this is: "Is a call to window.open() asynchronous
    > with respect to the retrieval of the target url for that window?"
    >
    > Thanks,
    > Wes Gamble
     
    ChrisHolland@InternetBrands, Jun 1, 2007
    #2
    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. John Smith
    Replies:
    8
    Views:
    418
    John Smith
    Apr 22, 2004
  2. M. Moennigmann

    allocate 2d array in function and return it to caller

    M. Moennigmann, May 28, 2004, in forum: C Programming
    Replies:
    8
    Views:
    7,317
    Dave Thompson
    Jun 10, 2004
  3. Greenhorn
    Replies:
    15
    Views:
    868
    Keith Thompson
    Mar 6, 2005
  4. Matthew Peter

    Return name of caller function?

    Matthew Peter, Jun 26, 2007, in forum: Python
    Replies:
    0
    Views:
    257
    Matthew Peter
    Jun 26, 2007
  5. Mark
    Replies:
    2
    Views:
    410
Loading...

Share This Page