[thelist] Adressing field values through the DOM

Stephen Caudill SCaudill at municode.com
Thu Nov 21 16:11:01 CST 2002


javascript heads,
  the DOM is not my friend.  I want it to be.  have even invited it for beers a few times.  but no good.
here's my problem:
  I have a hidden field whose values are populated by a SQL query.  Those values in turn are brought into an array in a javascript that randomly displays the values in a slick little fade in / fade out manner.  All is well with the ever forgiving IE.  However, it does not jive with a single solitary other browser out there.  Which leads me to believe its an error in how I am adressing the field through the DOM.  this is the string I am using to get the values in question:

document.forms['poparray'].elements['munipop'](i).value

the (i) is a variable that denotes the number of items in the array.  The full source and the script in action (IE only) is available at:

http://neohero.municode.com/munitest
(its the little box on the bottom right)

can someone tell me where I am going awry?

Thanks,
Stephen Caudill
Web Developer
Municipal Code Corporation
www.municode.com
scaudill at municode.com


PS > a good resource on using javascript debuggers would be swell as well (I have RTFM for the Venkman debugger for Moz and it just dont make no sense [look at the silly monkey!] )
PSS> on the off chance .jeff remembers schooling me on the DOM problem I was having last time, please dont beat me up for being thick headed...



More information about the thelist mailing list