OK. I have found out something:

The iframe is actually loaded like this:

iframe.set('src', (config.secure ? 'https' : 'http') + '://' +
config.frequency + '.' + config.server + '/?[{"cmd":"script","params":
{"domain":"' + document.domain + '","scripts":["' +
config.scripts.join('","') + '"]}}]');

If the config.frequency goes beyond my own maximum config.frequency,
the it is not loaded and that's what happened to me.

On my dev environment, I use a hosts file on Windows (instead of a DNS
service that will deal with the wild card *) and I only have a limited
number of entries.

Mystery solved.

Now I should not receive this error online as I have a DNS service
obviously.

Glad I understood this one.




On May 30, 2:10 pm, Nicolas <[email protected]> wrote:
> Hi,
>
> I am now trying to fix an old problem which seems to occur from time
> to time (and I have it in front of my eyes on IE9). Look at this piece
> of code, it will be familiar to some of you, as the problem has
> already been mentionned here.
>
>             iframe.addEvent('load',  function()
>             {
>                 alert("load event: "+iframe.id);
>                 if (!iframe.contentWindow.APE)
>                 {
>                     setTimeout(iframe.onload, 100);//Sometimes IE fire
> the onload event, but the iframe is not loaded -_-
>                 }
>                 else
>                 {
>                     iframe.contentWindow.APE.init(config);
>                 }
>             });
>
> Sometimes, APE stops with an error on this line: if (!
> iframe.contentWindow.APE).
>
> When this happens frame.contentWindow.APE is completely unreachable.
> Even iframe is not accessible. However, if I put an alert (iframe.id)
> right before, I get the proper value! It means that iframe is loaded
> indeed, but not properly.
>
> Investigating some more, I went to look at
>
> var iframe = new Element('iframe', {
>  id: 'ape_' + config.identifier,
>  styles: {
>  display: 'none',
>  position: 'absolute',
>  left: -300,
>  top: -300
>  }
>  }).inject(document.body);
>
> where iframe is created and injected into document.body.
>
> What I found is that iframe is actually not injected. There is no
> error shown. But the iframe in not in Body (it is in Body when things
> go right, which is most of the time).
> In load: function(), the iframe is supposed to be loaded. However, it
> appears that sometimes, it isn't or maybe it is but in an instable/
> incorrect way.
>
> I am now running into this problem systematically on IE9. If I refresh
> the page, the problem will not go away. If I close the browser, it
> will be back on track and APE will load fine.
>
> So, WTF is iframe loaded improperly? What could cause this behaviour?
> The browser is obviously unstable, but why?

-- 
You received this message because you are subscribed to the Google
Groups "APE Project" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/ape-project?hl=en
---
APE Project (Ajax Push Engine)
Official website : http://www.ape-project.org/
Git Hub : http://github.com/APE-Project/

Reply via email to