From: Robert R. <rra...@ya...> - 2000-11-27 20:13:31
|
Are you calling your code on DynAPI.onload? If not, I believe that document.body.x is undefined in IE. So make sure you call it after the page has loaded. -- Robert Rainwater <rra...@ya...> On Fri, 24 Nov 2000 15:56:46 -0600 Abel Eduardo Cantú Salas <abe...@al...> wrote: > im doing some agregates to the dynlayer.js, why? i get errors (from IE) like undefined object if i add the code in an external file. I think the problem is that IE doesn't respect the order in wich the includes are wrote, and just process the first script that loads (the smallest, in this case mine). > > Whatever, if i could do it outside dynlayer.js ill do it for sure but for now i have another problem with IE: > > the following code doesn't work (in IE) and im thinking it is the same problem again > > if (document.all) /*thanks to Doug Melvin*/ > DynAPI.clientRect = new Rect(0, 0, document.body.clientWidth, document.body.clientHeight) > else > DynAPI.clientRect = new Rect(0, 0, window.innerWidth, window.innerHeight) > > > what does Rect do? just mantain some useless information: > > function Rect(left, top, width, height){ > this.left = left > this.top = top > this.width = width > this.height = height > } > > it works perfectly in NS but in IE i get the message "Object required", ...? > > somebody has an idea of whats going on? > > PD. -- id rather prefer write: if(DynAPI.browser.ie) ... but it doesn't work either > > by the way, isn't there already any widget library? maybe i can get some ideas from there! > > Thanks! |