From: Max C. <ma...@bi...> - 2000-12-06 04:23:15
|
Hi again Brandon, I think I can throw some light onto my problem. The following codw works just fine. gridDiv = new DynLayer() gridDiv.setSize(intScreenWidth,intScreenHeight) gridDiv.setBgColor('lightslategray') gridDiv.moveTo(10,10) this.document.addChild(gridDiv) gridDiv.loadHTML('generic.html') gridDiv.css.borderWidth="2px" gridDiv.css.borderColor="#d4947f" gridDiv.css.borderStyle="solid" gridDiv.setVisible(true) However if I change to the following:- mainpage=new DynDocument(parent.page) gridDiv = new DynLayer() gridDiv.setSize(intScreenWidth,intScreenHeight) gridDiv.setBgColor('lightslategray') gridDiv.moveTo(10,10) mainpage.addChild(gridDiv) gridDiv.loadHTML('generic.html') gridDiv.css.borderWidth="2px" gridDiv.css.borderColor="#d4947f" gridDiv.css.borderStyle="solid" gridDiv.setVisible(true) then its NO GO Appears to be a problem handling the DynDocument? I hope I am helping and not causing more problems. Max ----- Original Message ----- From: "Brandon Myers" <bnd...@ho...> To: <dyn...@li...> Sent: Wednesday, December 06, 2000 9:03 AM Subject: Re: [Dynapi-Help] loadHTML > For all those that want to use loadHTML object: > > Check the case of dynAPI > If the D in dyn should be caps. > dynAPI --> DynAPI > > line 99: > dyndoc.addEventListener(lqLoadEvent) > : > DynAPI.dyndoc.addEventListener(lqLoadEvent) > > Now. If the API has been changed back, and it doesn't support firing onLoad > in the loadHandler of DynAPI object, there will be a problem, and you should > move the > DynAPI.loadQueuedHTML(); > to the end of the loadhandler in the DynAPI object. > > There's another thing... I believe in the public release of DynAPI it's > DynAPI.document not DynAPI.dyndoc. > > Simple search and replace will fix this. I made quite a few enhancements and > speed increases to the core. It's quite stable. > > > ----- Original Message ----- > From: "Geoffrey Makstutis" <gm...@51...> > To: <dyn...@li...> > Sent: Sunday, November 26, 2000 5:14 PM > Subject: [Dynapi-Help] loadHTML > > > > I'm trying to load external content into a dynlayer using the > loadHTML-public.js file (supplied by Brandon Myers). However, I keep getting > a series of errors as follows: > > > > dyndoc is not defined > > > > followed by: > > > > dynAPI is not defined > > > > The code I'm using is: > > > > <script language="Javascript" src="./js/dynapi.js"></script> > > <script language="Javascript"> > > > > DynAPI.setLibraryPath('./js/lib/') > > DynAPI.include('dynapi.api.dynlayer') > > DynAPI.include('dynapi.api.browser') > > DynAPI.include('dynapi.api.dyndocument') > > DynAPI.include('dynapi.api.events') > > DynAPI.include('dynapi.ext.slide') > > DynAPI.include('dynapi.ext.loadHTML-public') > > > > DynAPI.onLoad=function() { > > myLayer = new DynLayer() > > myLayer.setSize(100,100) > > myLayer.setBgColor('#c0c0c0') > > myLayer.moveTo(100,100) > > dynAPI.dyndoc.addChild(myLayer) > > myLayer.loadHTML('index.html') > > } > > > > Can anyone suggest a fix or is there a better .js file for loading > external content into a layer? > > > > Thanks > > > > > > _______________________________________________ > > Dynapi-Help mailing list > > Dyn...@li... > > http://lists.sourceforge.net/mailman/listinfo/dynapi-help > |