The "defer" attribute is irrelevant with the new XmlHttpRequest
methods, but:  you really should stop using document.write().  Use
DOM APIs to add elements and text content.

-- Adam


On 6/25/07, D. Cardon <[EMAIL PROTECTED]> wrote:
Hi all,

I ran into a puzzling bug today which took a good bit of time to figure out.  
So I thought I'd
mention it in case someone else runs into the same problem.

I have been developing a few of my own custom components, which launch 
javascripts that load
custom page content via AJAX.  Since I wanted to prevent my scripts from 
running within the
_pprIFrame, I used the advice of this post:
http://mail-archives.apache.org/mod_mbox/incubator-adffaces-user/200612.mbox/[EMAIL
 PROTECTED]
and applied the "defer" attribute to my script tag.  I had been doing most of 
my testing in
Firefox, but thought I would test it out on IE7 today.  On loading the page in 
IE7 I got an empty
browser window, but Firefox rendered everything just fine.  After a few hours 
digging into IE7 and
its horrible JavaScript debugger, I discovered that IE7 was giving up on a line 
in my script that
called the document.write(...) method.

Apparently, IE7 expects scripts with the 'defer' attribute to explicitly honor 
the 'I will not
write to page' contract.  Upon breaking that contract, my original page 
disappeared and IE7
created a new one altogether.  Unfortunately, this means that my custom 
component cannot reside in
a _pprIFrame, which certainly would have been useful.  Is this issue resolved 
with the new
XmlHttpRequest methods for PPR?

--David



____________________________________________________________________________________
Pinpoint customers who are looking for what you sell.
http://searchmarketing.yahoo.com/

Reply via email to