[Javascript] Show full text in pop up window - findingobject position

David Lovering dlovering at gazos.com
Thu Mar 18 18:07:22 CST 2004


I really do like the functionality of PPK's list generator (and the various
other bits associated with it), but for some reason my IE 6.02+ browser
always displays an error when I run his
http://www.quirksmode.org/sitemap.html script.  It seems to think there's a
missing identifier on line 504 of the script.  Mind you, IE's debugger is as
close to useless as anyone would want, so the only thing that's 100-percent
certain is that there's absolutely nothing wrong with line 504 of his
sitemap.html script -- but something riles it up, and I'd be interested in
finding it (and fixing it) before showing my clients this method.

Other than that, Mrs. Lincoln liked the play just fine.

-- Dave Lovering

----- Original Message ----- 
From: "Paul Novitski" <paul at dandemutande.org>
To: "[JavaScript List]" <javascript at LaTech.edu>
Sent: Thursday, March 18, 2004 1:46 PM
Subject: Re: [Javascript] Show full text in pop up window - findingobject
position


> On the subject of finding the position of an object, Peter-Paul Koch has
an
> excellent discussion & script on his page:
> http://www.quirksmode.org
> Navigate to Javascript / DHTML / Find position
>
> Paul
>
>
>
> At 11:49 AM 3/18/2004, I wrote:
> ...
> >One way to find the position of an object on the screen is to add its
> >position to the positions of all of its parent containers:
> >
> >var oObj = oThingie;
> >var iTotalTop = 0;
> >var iTotalLeft = 0;
> >
> >while (oObj){
> >         iTotalTop += oObj.offsetTop;
> >         iTotalLeft += oObj.offsetLeft;
> >         oObj = oObj.offsetParent;
> >}
> >
> >This loop continues to walk up the DOM until it reaches the top.  It
could
> >be elaborated to include margins & padding when appropriate.
> >
> >I've used this successfully only when beginning with an image within a
> >table cell, but perhaps someone else here could tell me how to begin with
> >the <td> itself.
>
>
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>





More information about the Javascript mailing list