[thelist] [javascript] getElementById

.jeff jeff at members.evolt.org
Thu Oct 24 01:22:01 CDT 2002


hi,

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> From: S.tygian B.lacksmith S.tudios
>
> Anyway, to amend my earlier post: technically, you don't
> have to access the option child's value like I stated.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

true.  you can just not access them at all.  sure makes for having to write a lot less lines of code.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> It depends on whether or not you want to rely on the DOM
> level-whatever HTML compatibility functions.
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

no, it actually depends on whether or not you want to support the browsers that haven't implemented the hack of a value property for a select object.

><><><><><><><><><><><><><><><><><><><><><><><><><><><><><
> The way that I suggested is more along the lines of
> strict DOM coding - but you can also access it using
> the value property of the select element (compatibility
> style).
><><><><><><><><><><><><><><><><><><><><><><><><><><><><><

you can only use this technique in some browsers.  oh, i suppose you could get fancy and build a custom value() method on the select object that'd return the value of the selected option, but why when you could just be accessing that information the right way.

.jeff

http://evolt.org/
jeff at members.evolt.org
http://members.evolt.org/jeff/




More information about the thelist mailing list