Just a note on searching DOM from a point to nearest tag of given type. To be used in panels of radio plus text box; etc. In mystudents.php the fns getTagUp() getTagDown() show iteration upwards, downwards, and sideways. They may be taken as models? Needs thought about which direction to go first in various applications of this. Panel applic. may want sideways to take priority (getTagDown does down first, sibs second). And it will need to combine going up and sideways (and down again). I.e. start with self. Go up one. (call with self.parent?) Do sibs first, then down. i.e. loop over sibs checking; then again with recursion. *Need to change the match test code to do: Have non-null ptr; and field nodeName Match either $tag to nodeName OR .nodeName == 'INPUT' && .type == $tag [e.g. submit, text, ...] Will need a 3rd function to 'nearest'. It should search first sibs, then down, then up. i.e. foreach up foreach down foreach sib