[thelist] DOM: Counting node of type 1?

Frank lists at frankmarion.com
Wed Mar 5 14:02:13 CST 2003

At 10:33 AM 3/5/2003 -0500, Saila, Craig wrote:
>If your DIV has an ID:
>  nObj = documentGetElementById("id")
>  spanObjs = nObj.documentGetElementsByTagName("span")
>"spanObjs" will then contain an array of all the SPANs within the
>particular DIV.
>Will this work for you?

I'll say. This was exactly what I wanted. I've managed to reduce 8 lines to

         spanLine[count].firstChild.nodeValue = formArray[count] ;

Thank you with a big happy smile!


More information about the thelist mailing list