ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  Writing Advanced JavaScript
Subject:   popup menu javascript
Date:   2007-10-22 17:44:17
From:   drfinesse
Response to: popup menu javascript

Basically, yes. As mentioned in the text, each node stores the relative position to its parent in this field, so you must traverse all the way up to the root to get the correct total. Note some browsers have easier ways of getting this info (by looking in different places), but this method is reliable and works on ALL modern browsers.