How to check if url loaded in layout cell?

I would like to know how I can check if a url has completed loading in a layout cell after attachURL command? Is there some sort of a call back function or some other trick for checking?

Thanks

Purvez

In hich mode is the page loaded: iframe (attachURL(url)) or Ajax (attachURL(url,true))?

In case of Ajax, you may set onContentLoaded event handler that gets cell id as parameter.

If the page is loaded into an iframe, you need to set onload event handler for this page and call parent function from this handler:

window.onload = function(){
parent.someFunction();
}

Hi Alexandra

I’m attaching using the following format:

dhxLayout.cells(“a”).attachURL(“http://www.google.com/”);

Would that be iframe or Ajax? Alternately please could you point me to examples of loading via iframe or Ajax.

Thanks for your response.

Purvez

Would that be iframe or Ajax?

Iframe

You can not load the page from different domain by Ajax.

attachURL(url) - iframe loading
attachURL(url,true) - Ajax

In case of Ajax, the page content is added as innerHTML

Thanks! I managed to get it right on point.Highly appreciate your help))