Javascript execution when attachObject is used

I want to load some one of the main page’s

to dhtmlxWindow(as far, as I understod, attachObject is uesed for this purpose). It is also necessary to execute some javascript code inside this
at dhtmlxWindow loading. As for now the script is executed only when the main page is loaded. How should I solve this problem?


You can call the necesary function after attachObject excuted:


win.attachObject(some_obj);


some_function();

Thanks a lot! I could not even imagine, how stupid my question was…