You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tapestry.apache.org by Paul Stanton <pa...@mapshed.com.au> on 2010/09/30 03:03:37 UTC

tapestry.init (js) not being called in ie

  Hi all,

I'm having a strange problem. It's only started happening recently 
however I can't for the life of me figure out what is causing it.

the short story is that Tapestry.init is never being called.

the long story is that prototype.fireContentLoadedEvent is being called 
prematurely, ie before Tapestry.onDOMLoaded(function() { 
Tapestry.init(...);});

prototype.fireContentLoadedEvent is being called from the handler for 
when !document.addEventListener
ie (see prototype.js line 4125)

   } else {
     document.write("<script id=__onDOMContentLoaded defer 
src=//:><\/script>");
     $("__onDOMContentLoaded").onreadystatechange = function() {
       if (this.readyState == "complete") {
         this.onreadystatechange = null;
         fireContentLoadedEvent();
       }
     };
   }

and this is happening well before tapestry has added its handlers...

any tips?

thanks, paul.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry.init (js) not being called in ie

Posted by Paul Stanton <pa...@mapshed.com.au>.

i figured it out........... !!

in IE, if you change the |innerHTML| of any element during page load, 
all "deferred" scripts are loaded prematurely...

one of my inline javascript procedures was changing the |innerHTML| of 
an element during page load and delaying this script resolved the issue 
for me.

so the thing i need to remember is:

never change |innerHTML| until after page load!


On 30/09/2010 12:10 PM, Paul Stanton wrote:
>  ie8
>
> tapestry 5.1.0.5
>
> pretty sure it's not tapestry's fault, something is causing ie8 to 
> load deferred scripts before the page is finished loading... but what!!!!
>
> On 30/09/2010 11:29 AM, Howard Lewis Ship wrote:
>> I haven't seen this; what version of IE are you using?  What libraries
>> / JS?  Which version of Tapestry?
>>
>> http://www.catb.org/esr/faqs/smart-questions.html
>>
>> On Wed, Sep 29, 2010 at 6:03 PM, Paul Stanton<pa...@mapshed.com.au>  
>> wrote:
>>>   Hi all,
>>>
>>> I'm having a strange problem. It's only started happening recently 
>>> however I
>>> can't for the life of me figure out what is causing it.
>>>
>>> the short story is that Tapestry.init is never being called.
>>>
>>> the long story is that prototype.fireContentLoadedEvent is being called
>>> prematurely, ie before Tapestry.onDOMLoaded(function() {
>>> Tapestry.init(...);});
>>>
>>> prototype.fireContentLoadedEvent is being called from the handler 
>>> for when
>>> !document.addEventListener
>>> ie (see prototype.js line 4125)
>>>
>>>   } else {
>>>     document.write("<script id=__onDOMContentLoaded defer
>>> src=//:><\/script>");
>>>     $("__onDOMContentLoaded").onreadystatechange = function() {
>>>       if (this.readyState == "complete") {
>>>         this.onreadystatechange = null;
>>>         fireContentLoadedEvent();
>>>       }
>>>     };
>>>   }
>>>
>>> and this is happening well before tapestry has added its handlers...
>>>
>>> any tips?
>>>
>>> thanks, paul.
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>>> For additional commands, e-mail: users-help@tapestry.apache.org
>>>
>>>
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>

Re: tapestry.init (js) not being called in ie

Posted by Paul Stanton <pa...@mapshed.com.au>.
  ie8

tapestry 5.1.0.5

pretty sure it's not tapestry's fault, something is causing ie8 to load 
deferred scripts before the page is finished loading... but what!!!!

On 30/09/2010 11:29 AM, Howard Lewis Ship wrote:
> I haven't seen this; what version of IE are you using?  What libraries
> / JS?  Which version of Tapestry?
>
> http://www.catb.org/esr/faqs/smart-questions.html
>
> On Wed, Sep 29, 2010 at 6:03 PM, Paul Stanton<pa...@mapshed.com.au>  wrote:
>>   Hi all,
>>
>> I'm having a strange problem. It's only started happening recently however I
>> can't for the life of me figure out what is causing it.
>>
>> the short story is that Tapestry.init is never being called.
>>
>> the long story is that prototype.fireContentLoadedEvent is being called
>> prematurely, ie before Tapestry.onDOMLoaded(function() {
>> Tapestry.init(...);});
>>
>> prototype.fireContentLoadedEvent is being called from the handler for when
>> !document.addEventListener
>> ie (see prototype.js line 4125)
>>
>>   } else {
>>     document.write("<script id=__onDOMContentLoaded defer
>> src=//:><\/script>");
>>     $("__onDOMContentLoaded").onreadystatechange = function() {
>>       if (this.readyState == "complete") {
>>         this.onreadystatechange = null;
>>         fireContentLoadedEvent();
>>       }
>>     };
>>   }
>>
>> and this is happening well before tapestry has added its handlers...
>>
>> any tips?
>>
>> thanks, paul.
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
>> For additional commands, e-mail: users-help@tapestry.apache.org
>>
>>
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org


Re: tapestry.init (js) not being called in ie

Posted by Howard Lewis Ship <hl...@gmail.com>.
I haven't seen this; what version of IE are you using?  What libraries
/ JS?  Which version of Tapestry?

http://www.catb.org/esr/faqs/smart-questions.html

On Wed, Sep 29, 2010 at 6:03 PM, Paul Stanton <pa...@mapshed.com.au> wrote:
>  Hi all,
>
> I'm having a strange problem. It's only started happening recently however I
> can't for the life of me figure out what is causing it.
>
> the short story is that Tapestry.init is never being called.
>
> the long story is that prototype.fireContentLoadedEvent is being called
> prematurely, ie before Tapestry.onDOMLoaded(function() {
> Tapestry.init(...);});
>
> prototype.fireContentLoadedEvent is being called from the handler for when
> !document.addEventListener
> ie (see prototype.js line 4125)
>
>  } else {
>    document.write("<script id=__onDOMContentLoaded defer
> src=//:><\/script>");
>    $("__onDOMContentLoaded").onreadystatechange = function() {
>      if (this.readyState == "complete") {
>        this.onreadystatechange = null;
>        fireContentLoadedEvent();
>      }
>    };
>  }
>
> and this is happening well before tapestry has added its handlers...
>
> any tips?
>
> thanks, paul.
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
> For additional commands, e-mail: users-help@tapestry.apache.org
>
>



-- 
Howard M. Lewis Ship

Creator of Apache Tapestry

The source for Tapestry training, mentoring and support. Contact me to
learn how I can get you up and productive in Tapestry fast!

(971) 678-5210
http://howardlewisship.com

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tapestry.apache.org
For additional commands, e-mail: users-help@tapestry.apache.org