Try it with the timeout first, it might be that a timeout of just 1ms is
enough, sometimes just breaking the order of execution like this is enough
for another process to do what it has to.

Otherwise you'd have to start adding variables to the end of each .js file,
maybe something like this would work:

<script language="Javascript">

DynAPI.loadedFiles=0
DynAPI.setLibraryPath('../src/lib/');
 DynAPI.include('dynapi.api.*');
 DynAPI.include('dynapi.event.*');
 DynAPI.include('dynapi.util.thread.js');

</script>
<script language="Javascript">

DynAPI.onLoad=function(){
        if(DynAPI.loadedFiles==9) DynAPI.mainPage()
        else window.setTimeout("Dynapi.onLoad()", 50)
}

DynAPI.mainPage=function() {
    //your normal code goes here
}


Then at the end of each included file you'd put:
        DynAPI.loadedFiles++

That's 3 files for api.*, 5 for event.* and 1 for thread.js

If this works it could easily be included inside DynAPI, so the tests are
performed internally, and onLoad is fired when all files are loaded.
This might help the errors I sometimes get when connecting to a slow site
(mine :o) , that something is undefined, after refreshing the page it works
ok.


Richard.


----- Original Message -----
From: "Jozef Pierlejewski" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: 14 June, 2001 10:47
Subject: RE: [Dynapi-Dev] IE5 / PWS problems


> yes i was thinking something like that, and presumably i'd need to just
> increase the timeout until it worked.....
>
> (i wonder what happens when we start getting really fast cable internet
> connections? same problem occurring?)
>
>
> however i was hoping for something more along the lines of
>
> DynAPI.onLoad=function()
> {
> if(DynAPILoaded) // this is set once all javascripts
>      // have initialised...i dont know how however!!
> {
> DynAPI.mainPage()
> }
> else
> {
> window.setTimeout("Dynapi.onLoad()", 50)
> }
> }
>
>
>
>
> thanks
> joe
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED]]On Behalf Of Richard
> Bennett
> Sent: Thursday, June 14, 2001 7:54 AM
> To: [EMAIL PROTECTED]
> Subject: Re: [Dynapi-Dev] IE5 / PWS problems
>
>
> You seem to be the only one having this problem, but a little hack might
> solve it, if you delay the page a little, this might be enough.
> Try this:
>
> DynAPI.onLoad=function() {
>     setTimeout('DynAPI.mainPage()',500)
> }
> DynAPI.mainPage=function() {
>     //your normal code goes here
> }
>
> Richard.
>
> ----- Original Message -----
> From: "jmp909" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: 14 June, 2001 02:32
> Subject: RE: [Dynapi-Dev] IE5 / PWS problems
>
>
> > i've still had no luck with this. remote servers run the stuff fine (ie
if
> i
> > am connecting to a web server via the internet)...
> >
> > i'm wondering what i would need to do within dynapi.js so that the
> > dynapi.onload event actually checked to see if all .js included files
had
> > loaded and run? a timeout? a flag?
> >
> > i suppose if there are no other developers getting this problem then it
is
> > going to be tricky to fix.
> >
> > thanks
> > joe.
> >
> >
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of jmp909
> > Sent: 12 June 2001 02:47
> > To: [EMAIL PROTECTED]
> > Subject: RE: [Dynapi-Dev] IE5 / PWS problems
> >
> >
> > aaaarrgghh...it worked for a while and now it doesnt :(
> >
> > -----Original Message-----
> > From: [EMAIL PROTECTED]
> > [mailto:[EMAIL PROTECTED]]On Behalf Of jmp909
> > Sent: 11 June 2001 23:23
> > To: [EMAIL PROTECTED]
> > Subject: [Dynapi-Dev] IE5 / PWS problems
> >
> >
> > Hi,
> >
> > (Michael asked if my problems with "object unknown" errors when creating
> new
> > ViewPorts etc occurred when running off the file system)
> >
> > DynAPI worked fine off the local file system as opposed to through the
web
> > server
> >
> > also If I change my cache settings to:
> >
> > Check for newer versions of stored pages - *Automatically*
> >
> >
> > then everything also works fine running through the web server. Normally
i
> > have the setting set to "every time" ie "no cache" and this causes it to
> > fail on PWS....i dont know why this is the case but since i dont have
> > problems running off a remote server normally even with cache set to
> > "automatic", i can bypass the problem now during development by changing
> my
> > cache settings.
> >
> > It would be nice if someone could still fix (and therefore identify) the
> > problem although it's not really totally necessary for now.
> >
> > thanks
> > joe
> >
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
> >
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
> >
> >
> > _______________________________________________
> > Dynapi-Dev mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/dynapi-dev
> >
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>
>
> _______________________________________________
> Dynapi-Dev mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/dynapi-dev
>


_______________________________________________
Dynapi-Dev mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/dynapi-dev

Reply via email to