[Javascript] setting select drop selectedIndex
Schalk
schalk at volume4.com
Wed Aug 2 13:22:03 CDT 2006
Thanks, I will give these a shot and let everyone know which one did the
trick. Thanks!
Paul Novitski wrote:
> At 10:21 AM 8/2/2006, Schalk wrote:
>> Should the following be able to set the selectedIndex of a select
>> drop down?
>>
>> document.checkout.billingstate.options[document.checkout.billingstate.selectedIndex].value
>> = state;
>
>
> No, that statement sets the value of the option at the selected
> location. I believe what you want is:
>
> document.checkout.billingstate.selectedIndex = state;
>
> where 'state' is an integer 0-N.
>
> Paul
> _______________________________________________
> Javascript mailing list
> Javascript at LaTech.edu
> https://lists.LaTech.edu/mailman/listinfo/javascript
>
>
--
Kind Regards
Schalk Neethling
Web Developer.Designer.Programmer.President
Volume4.Business.Solution.Developers
More information about the Javascript
mailing list