|
-
April 5th, 2003, 03:53 PM
#1
Troubles with adding options to a select element
I'm having troubles with adding options to a select element via JavaScript. Everything works just fine except for in IE 5.0 Win. I get an error saying "this method is not supported by this object." I've tried to figure out what's happening here and found that the alert (only there for debugging purposes) only returns [object] in IE 5.0, but in IE 5.5 and 6.0 and in all versions of NS the alert returns [object OPTION]. This is probably the explanation to why IE 5.0 is choking but what can I do to solve this? I think the other code is ok because everything works just fine in other browsers.
Code sample:
var cartItems = new Option("Items");
alert(cartItems);
parent.cartframe.document.cartform.basket.options[i] = cartItems;
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|