View Single Post
 
Old July 3rd, 2006, 09:41 AM
nzakas's Avatar
nzakas nzakas is offline
Wrox Author
 
Join Date: Dec 2004
Location: Peabody, MA, USA.
Posts: 217
Thanks: 0
Thanked 5 Times in 5 Posts
Default

I'm guessing that you're probably running your code in standards mode. Try making this change:

Code:
while(oNode && oNode.tagName != "BODY") {
       iLeft += oNode.offsetLeft;
       oNode = oNode.offsetParent;
}
Nicholas C. Zakas
Author, Professional JavaScript for Web Developers (ISBN 0764579088)
http://www.nczonline.net/