[thelist] Scripting as backward compatibly as possible (was: IE-Select box render bug or my bad?)

Joe Crawford jcrawford at avencom.com
Wed Mar 14 13:01:26 CST 2001

Joshua OIson wrote:
> Believe it or not, using the code you provided doesn't seem to cause the
> same rendering bugs that the code I was using caused.  Thank you for your
> help.
> <!--tip type="Internet Explorer" type="Dynamic Select Elements"-->
> MSDN suggests using CreateElement, innerText, and value combination to
> create dynamic OPTIONs for a SELECT box, and removeElement to delete an
> OPTION from a SELECT box.  If you follow their code and find that the SELECT
> box behaves poorly on insert and delete--as in rendering problems where
> options seem to be cut off--try using the Option objects instead.  For
> example:

<conspiracy theory>
Why on earth would MSDN recommend using innerText (proprietary, but
proprierary that people seem to like) and those other ways to add new
<option> text and value pairs when people have been using "new Option"
for a long time. Something which I believe should work well in Netscape
3,4,6, IE3,4,5,5.5, WebTV, and Opera. The innerText stuff would limit
you greatly and doesn't win you any simpler coding that I can see.

http://www.webreference.com/javascript/960902/source.html shows a use of
new Option in 1996!

Could it be that certain browser manufacturers is interested in making
as much web scripting as possible incompatible with older browsers?
</conspiracy theory>

No, they'd never do anything like that.

Of course, maybe the people writing MSDN articles have drunk too much of
the kool aid and have forgotten about any client side scripting since
1999. :-\

	Joe <http://artlung.com>

More information about the thelist mailing list