window.open() problem in Firefox

Discussion in 'Javascript' started by Rick Brandt, Aug 3, 2006.

  1. Rick Brandt

    Rick Brandt Guest

    I am using window.open in an AJAX page and it works in both IE and FF but in the
    latter the hourglass stays up and both the progress bar and the small animated
    circle-of-dots graphic keep on running indefinitely in the new window.

    I can press the STOP button to get them to stop, but I'm wondering if there is
    something else I can do to get rid of this behavior. The page is most
    definitely loading properly and completely.

    If it matters what I am writing to the new document is an XML document after
    being passed through an XSL sheet. Sometimes the XML doc is large enough to
    fill several pages of the viewport, but often it is just a few lines and the
    problem is the same regardless.

    TIA
    Rick Brandt, Aug 3, 2006
    #1
    1. Advertising

  2. Hi,

    Rick Brandt wrote:
    > I am using window.open in an AJAX page and it works in both IE and FF but in the
    > latter the hourglass stays up and both the progress bar and the small animated
    > circle-of-dots graphic keep on running indefinitely in the new window.
    >
    > I can press the STOP button to get them to stop, but I'm wondering if there is
    > something else I can do to get rid of this behavior. The page is most
    > definitely loading properly and completely.
    >
    > If it matters what I am writing to the new document is an XML document after
    > being passed through an XSL sheet. Sometimes the XML doc is large enough to
    > fill several pages of the viewport, but often it is just a few lines and the
    > problem is the same regardless.
    >
    > TIA


    How do you write to the pop-up's document? Do you use document.write? If
    so, do you close the document when you're done writing?

    HTH,
    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    PhotoAlbum: http://www.galasoft-LB.ch/pictures
    Support children in Calcutta: http://www.calcutta-espoir.ch
    Laurent Bugnion, Aug 3, 2006
    #2
    1. Advertising

  3. Rick Brandt

    Rick Brandt Guest

    Laurent Bugnion wrote:
    > Hi,
    >
    > Rick Brandt wrote:
    > > I am using window.open in an AJAX page and it works in both IE and
    > > FF but in the latter the hourglass stays up and both the progress
    > > bar and the small animated circle-of-dots graphic keep on running
    > > indefinitely in the new window. I can press the STOP button to get them to
    > > stop, but I'm wondering
    > > if there is something else I can do to get rid of this behavior. The page is
    > > most definitely loading properly and completely.
    > >
    > > If it matters what I am writing to the new document is an XML
    > > document after being passed through an XSL sheet. Sometimes the
    > > XML doc is large enough to fill several pages of the viewport, but
    > > often it is just a few lines and the problem is the same regardless.
    > >
    > > TIA

    >
    > How do you write to the pop-up's document? Do you use document.write?
    > If so, do you close the document when you're done writing?
    >
    > HTH,
    > Laurent


    Isn't it amazing how as soon as you give up and post a question you take another
    look and the answer is staring you right in the face?

    I had...
    ocwin.document.close;

    ....instead of...
    ocwin.document.close();

    As soon as I added the parenthesis everything worked as expected.

    Thanks for the nudge though.
    Rick Brandt, Aug 3, 2006
    #3
  4. Hi,

    Rick Brandt wrote:
    > Isn't it amazing how as soon as you give up and post a question you take another
    > look and the answer is staring you right in the face?
    >
    > I had...
    > ocwin.document.close;
    >
    > ...instead of...
    > ocwin.document.close();
    >
    > As soon as I added the parenthesis everything worked as expected.
    >
    > Thanks for the nudge though.


    Happy to have been of help. What made me thought of it is that IE (being
    more forgiving of errors (which is a bad thing (really) (don't you love
    nested parenthesis?))) closes the document automatically if you forget
    to do so, while Mozilla (being less forgiving (which... yeah)) doesn't.

    Greetings,
    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    PhotoAlbum: http://www.galasoft-LB.ch/pictures
    Support children in Calcutta: http://www.calcutta-espoir.ch
    Laurent Bugnion, Aug 4, 2006
    #4
  5. Rick Brandt

    RobG Guest

    Laurent Bugnion wrote:
    [...]
    > Happy to have been of help. What made me thought of it is that IE (being
    > more forgiving of errors (which is a bad thing (really) (don't you love
    > nested parenthesis?))) closes the document automatically if you forget
    > to do so, while Mozilla (being less forgiving (which... yeah)) doesn't.


    I'm not sure you could call that an 'error' as such - in fact you can
    probably point the finger at Mozilla here.

    The specification is a bit vague, all it says is that document.close()
    will force rendering. IE seems to call document.close() when the
    script ends and Mozilla doesn't, even though Mozilla renders the
    document as if it had (but keeps the 'loading' thing happening).

    On the other hand, Mozilla does seem to call document.open() when
    document.write() is called - if you try to write to a document without
    first calling document.open, should you get an error? The spec doesn't
    say so.

    <URL: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-75233634 >


    --
    Rob
    RobG, Aug 4, 2006
    #5
  6. Hi,

    RobG wrote:

    > I'm not sure you could call that an 'error' as such - in fact you can
    > probably point the finger at Mozilla here.
    >
    > The specification is a bit vague, all it says is that document.close()
    > will force rendering. IE seems to call document.close() when the
    > script ends and Mozilla doesn't, even though Mozilla renders the
    > document as if it had (but keeps the 'loading' thing happening).
    >
    > On the other hand, Mozilla does seem to call document.open() when
    > document.write() is called - if you try to write to a document without
    > first calling document.open, should you get an error? The spec doesn't
    > say so.
    >
    > <URL: http://www.w3.org/TR/DOM-Level-2-HTML/html.html#ID-75233634 >


    You're right. I should have separated the statement "IE is more
    forgiving of errors" (still true) and the fact that it closes the
    document automatically more clearly.

    Greetings,
    Laurent
    --
    Laurent Bugnion, GalaSoft
    Software engineering: http://www.galasoft-LB.ch
    PhotoAlbum: http://www.galasoft-LB.ch/pictures
    Support children in Calcutta: http://www.calcutta-espoir.ch
    Laurent Bugnion, Aug 4, 2006
    #6
    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. PC HUA
    Replies:
    2
    Views:
    404
    PC HUA
    May 19, 2004
  2. Merlin
    Replies:
    6
    Views:
    104
    Martin Honnen
    Dec 22, 2004
  3. Dominic Tocci

    window.open problem in firefox

    Dominic Tocci, Jul 5, 2005, in forum: Javascript
    Replies:
    8
    Views:
    342
    Dominic Tocci
    Jul 6, 2005
  4. tochiromifune

    Problem with window.open in Firefox

    tochiromifune, Jan 10, 2006, in forum: Javascript
    Replies:
    14
    Views:
    182
  5. Replies:
    1
    Views:
    231
Loading...

Share This Page