Can't appendChild to select option
I'm trying to add options to a select box
the error I get occurs when I try to append "hello" to the option object
here's the code that I'm trying to execute:
Quote:
var option=document.createElement("option");
option.value="1";
option.appendChild("hello");
document.forms[0].shows.appendChild(option);
here's the error I get:
the code is copied with slight modifications from here: http://developer.apple.com/internet/...e/example.html
it breaks when encountering option.appendChild("hello"); - something is wrong with this line but for the love of God I can't figure out what it is.
any ideas on why this is happening?