From: Raymond I. <xw...@ya...> - 2003-05-19 21:53:31
|
--- Jesse Vitrone <je...@6t...> wrote: > Raymond, > Thanks for the response. I noticed that the way > the library > includes worked had changed, and I had changed it > locally, but that > didn't help. The code that you have listed below > works, but my > 6thgear.js needs to use dynapi.document. So what > I'm doing, is that I'm > calling: > > dynapi.library.setPath('../dynapi/src/'); > dynapi.library.include('dynapi.api'); > dynapi.library.include('dynapi.ext.DynLayerInline'); > > from inside my 6thgear.js to set things up. > Then, later on in my 6thgear.js, I need to call > > dynapi.document.getWidth(); > > And that's when I'm getting the errors. I put an > alert in the setPath > method to make sure that was getting called, and it > is. And the error > isn't complaining about dynapi, it's complaining > about dynapi.document. > > Shouldn't I be able to call dynapi.document from > inside the included > js? Does this have to do with the BeforeLoad > creation stuff in the > changelog? Ok, I see what you're doing. It's best to create something like a config.js file that will set the path and load all the necessary apis. dynapi.library.setPath('../dynapi/src/'); dynapi.library.include('dynapi.api'); dynapi.library.include('dynapi.ext.DynLayerInline'); then include your 6thgear.js file which will then contain the following: dynapi.onLoad(function(){ alert(dynapi.document.getWidth()); }); It's best to use dynapi.document.getWidth() after loads -- Raymond Iving > Thanks, > Jesse > > Raymond Irving wrote: > > >Hi Jesse, > > > >This solution should work. Note that the 6thgear.js > >file is included after the core APIs are included > and > >that the APIs dont' use the .* extension any more: > > > >new extensions: > > > >dynapi.library.include('dynapi.api'); > >dynapi.library.include('dynapi.ext.DynLayerInline'); > > > >Please modify you code to reflect the following: > > > ><script language="Javascript" > >src="../dynapi/src/dynapi.js"></script> > ><script language="JavaScript"> > > dynapi.library.setPath('../dynapi/src/'); > > dynapi.library.include('dynapi.api'); > > > dynapi.library.include('dynapi.ext.DynLayerInline'); > ></script> > ><script language="JavaScript" > >src="../js/6thgear.js"></script> > ><script language="JavaScript"> > > alert(dynapi.document.getWidth()); > ></script> > > > > > >-- > >Raymond Irving > > > >--- Jesse Vitrone <je...@6t...> > wrote: > > > >--------------------------------- > > Hmm....as I described, I have my demo.php that > >includes dynapi.js, and6thgear.js It seems that if > I > >try to use dynapi.document in my6thgear.js, it > doesn't > >like it, but it's OK to use it furthur down inmy > >demo.php. > > > >This is probably just my lack of JS knowledge here, > >but, I'll askanyway: How come? Why isn't it > available > >for me to use in my jsinclude? I was able to do > this > >with 2.5, what changed? How can I workaround it? > > > >Thanks, > > Jesse > > > >-------- Original Message -------- > Subject: > > DynAPI 3.0 Date: Mon, 19 > May > >2003 13:33:32 -0400 From: Jesse > >Vitrone <je...@6t...> > To: > > dyn...@li... > > > >I got the source from CVS, and I'm trying to set up > my > >existing DynAPI2.5 stuff to work with it, but I'm > >getting errors that I don'tunderstand. > > > >I have this: > > > > <script > >language="Javascript"src="../dynapi/src/dynapi.js"></script> > > <script > >language="JavaScript"src="../js/6thgear.js"></script> > > > >In my 6thgear.js, I'm doing this at the top: > > > >DynAPI.library.setPath('../dynapi/src/'); > >DynAPI.library.include('dynapi.api.*'); > >DynAPI.library.include('dynapi.event.*'); > >DynAPI.library.include('dynapi.ext.inline.js'); > > > >now if I do this, right after that: > > > >alert(dynapi.document.getWidth()); > > > >I get this JS error: > > > >Error: dynapi.document has no properties > >Source File: http://localhost/6thgear/js/6thgear.js > >Line: 23 > > > >I don't get it, when I look at the docs for 3.0, I > see > >in the examplethat you're using dynapi.document to > add > >the child layers. Why is ittelling me that it has > no > >properties? > > > >I was able to do this in 2.5 without a problem, > what > >changed? > > > >Thanks in advance, > > Jesse Vitrone > > > >-------------------------------------------------------This > >SF.net email is sponsored by: ObjectStore.If > >flattening out C++ or Java code to make your > >application fit in arelational database is painful, > >don't do it! Check out ObjectStore.Now part of > >Progress Software. > >http://www.objectstore.net/sourceforge_______________________________________________Dynapi-Help > >mailing > >lis...@li...https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > >__________________________________ > >Do you Yahoo!? > >The New Yahoo! Search - Faster. Easier. Bingo. > >http://search.yahoo.com > > > > > >------------------------------------------------------- > >This SF.net email is sponsored by: ObjectStore. > >If flattening out C++ or Java code to make your > application fit in a > >relational database is painful, don't do it! Check > out ObjectStore. > >Now part of Progress Software. > http://www.objectstore.net/sourceforge > >_______________________________________________ > >Dynapi-Help mailing list > >Dyn...@li... > >https://lists.sourceforge.net/lists/listinfo/dynapi-help > > > > > > > > ------------------------------------------------------- > This SF.net email is sponsored by: ObjectStore. > If flattening out C++ or Java code to make your > application fit in a > relational database is painful, don't do it! Check > out ObjectStore. > Now part of Progress Software. > http://www.objectstore.net/sourceforge > _______________________________________________ > Dynapi-Help mailing list > Dyn...@li... > https://lists.sourceforge.net/lists/listinfo/dynapi-help __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com |