Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Javascript > window.open() problem in Firefox

Reply
Thread Tools

window.open() problem in Firefox

 
 
Rick Brandt
Guest
Posts: n/a
 
      08-03-2006
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


 
Reply With Quote
 
 
 
 
Laurent Bugnion
Guest
Posts: n/a
 
      08-03-2006
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
 
Reply With Quote
 
 
 
 
Rick Brandt
Guest
Posts: n/a
 
      08-03-2006
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.



 
Reply With Quote
 
Laurent Bugnion
Guest
Posts: n/a
 
      08-04-2006
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
 
Reply With Quote
 
RobG
Guest
Posts: n/a
 
      08-04-2006

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-HTM...ml#ID-75233634 >


--
Rob

 
Reply With Quote
 
Laurent Bugnion
Guest
Posts: n/a
 
      08-04-2006
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-HTM...ml#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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Can Firefox 1.5 be installed along side Firefox 1.0.6? Zygon Curry Firefox 6 09-14-2005 11:28 AM
Firefox/Linux import bookmarks from Firefox/Windows? Marek Williams Firefox 2 06-11-2005 04:22 PM
Yahoo! Toolbar Beta for Firefox - Not Compatible with Firefox 1.0.2? NA Firefox 6 04-02-2005 06:13 PM
Firefox gamed - Drudge getting around Firefox popup blocker Venger Firefox 10 12-22-2004 04:37 AM
so what does IE or any of the IE shells have over firefox ? (any anti firefox ppl bother looking at recent plugins available?) *ProteanThread* Firefox 12 10-20-2004 08:31 AM



Advertisments