PDA

View Full Version : Option() - that fourth argument, what exactly does it mean?


]|V|[agnus
07-18-2005, 05:01 PM
When creating a new Option element you can supply the function four parameters:

1. Text for the new option
2. Value for the new option
3. Boolean, equivalent of whether or not 'selected="selected"' were set for the option
4. ???

Well, not ???, but I am fuzzy. All my sources say that the fourth argument is a boolean determining whether or not this option "is currently selected." I can't understand fully the difference between that and the third argument. Can somebody please help explain?

Mr J
07-18-2005, 05:49 PM
Take look here, this may help

http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/option.html

]|V|[agnus
07-18-2005, 06:31 PM
So... are you saying that the fourth argument of Option() sets the defaultSelected property?