window.open() problem in Firefox

R

Rick Brandt

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
 
L

Laurent Bugnion

Hi,

Rick said:
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
 
R

Rick Brandt

Laurent said:
Hi,



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.
 
L

Laurent Bugnion

Hi,

Rick said:
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
 
R

RobG

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 >
 
L

Laurent Bugnion

Hi,
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
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,046
Latest member
Gavizuho

Latest Threads

Top