Is there a way to let the init phase of atlas run earlier than when *all* content of a page has been downloaded?
On our site we have content (images, iframes) from other sites. It seems the init phase will not run before all content (thus also content from out of our site, but also our own images) is downloaded. Which gives the user the illusion that our site is slow, but thats not the case, of course ... ;)
Thanks.
hello.
hum...i guess that you'll only have this problem if you're using xml-script. currently, i think that it only is processed on the window.load event...
Any news on this? Will atlas be able to runs its init phase earlier than the window.load event?
I am planning to call the Sys.Runtime.Initialize myself at the end of the HTML instead waiting for the window.onload event to eventually call it.
Does anyone see a downside for this?
I had the same idea, the problem is even when u place the code at the end of the document and call init() yourself u can't ensure that all scripts have been loaded. For example the following script block causes normally an exception saying the WebService.Method isn't aviable.
<script type="text/javascript"> Sys.Runtime.initialize(); WebService.Method( CallBack );</script>Is there anyway to know when all (webservice)references are loaded and ready? I need to call a function before the window onload but after all atlas ref's are fully loaded.
What we did was doing *all* javascripts include ourselves.
We do not use the scriptreferences of atlas anymore. We even dont let atlas include his own js files...
With Page.ClientScript.RegisterClientScriptInclude we include the atlas.js and his friends. ;)
The services are included as "xxxservice.asmx/js".
This way *all* javascript files are included at the very top of the HTML,
then its save call the service like you were intended to.
The reason why we also register atlas js files is about the order of the include file in the HTML.
When we dont do it ourselfs, the atlas.js may be included to late in the HTML.
HTH
Yesterday I was thinking to mail the atlas team about this "self registerclientscriptinclude" instead of using the scriptreferences
for the very purpose you are describing. Now seeing your post I will definately mail them today! :)
Qty:
The services are included as "xxxservice.asmx/js"
I tryed this myself but i ended up getting requests like "/undefined?mn=MehodName" - i think this has something to do with the appPath var?
Perhaps you can include script that set the path & apppath
RegisterStartupScript "XXXService.path = 'http://website/XXXService.asmx'; XXXService.appPath = 'http://website/'"
HTH
Didn't know the .path var - thx a lot!
No comments:
Post a Comment