Forum OpenACS Q&A: Re: Finding a specific FORM using DOM in Mozilla

Collapse
Posted by Jerry Asher on
Yes to both.  Last one first.  The error that's stated is that x has no properties.  Which is odd, as I can definitely find (document.write) that x.length is 2, but x.anythingelse causes an error.

I tried the DOM inspector, it's cute, but sigh, like most open source thingies, too little doc.  If I examine the object as a JavaScript object, I can find the forms object, but no forms underneath it.  As a DOM object, I can't figure out which of a bazillion attributes/properties/whathaveyou is the right path to take.  Walking down any path seems to lead me to a maze of twisty little passages, all alike.

A DOM GetElementsByTag approach might work, but again, it doesn't seem clear to me how I walk that structure to find the forms I am looking for.

(I think B&N is open now, perhaps a walk with the laptop to see if a newer and more definitive javascript the definitive guide is in stock.)