[thelist] Dynamically populating a select list

Stevenson N ngilas2003 at yahoo.com
Tue Dec 9 05:27:23 CST 2003


I have tried using:

var onfiltered= document.createElement("OPTION");
oDestination.options.add(oNewOption);
oNewOption.text = "Two";
oNewOption.value = "2";

But am getting the following js error message:

<><><<><><<><><<
Invalid Argument
<><><<><><<><><<

Also on using:
oDestination.options[ oDestination.options.length ] = new Option( "Two", "2") 

I get the following js error message:
<><><<><><<><><<<><><<><><<><><<<><><<><><<><><<
Object doesn't support this property or method
<><><<><><<><><<<><><<><><<><><<<><><<><><<><><<


on using:

oDestination.options.length = oDestination.options.length + 1;
oDestination.options[ Destination.options.length ].value = "2";
oDestination.options[ oDestination.options.length ].text = "Two2"; 

I get the following js error message:
<><><<><><<><><<<><><<><><<><><<<><><<><><<><><<
'options[...]' null or not an object
<><><<><><<><><<<><><<><><<><><<<><><<><><<><><<

What's wrong with my code given that all this are done on an IFRAME? 




---------------------------------
Do you Yahoo!?
Protect your identity with Yahoo! Mail AddressGuard


More information about the thelist mailing list