PAGE2GO2 HOME | INTERNET NEWS

LeighExchange - Free Advertising Network Stock Research at Internet Speed

Re: assigning 'selected' to option in form select

 List
Subject: Re: assigning 'selected' to option in form select
Poster: MichaelWhitemick@mickweb.com
Date: Fri, 23 Mar 2007 11:47:58 -0400
Related Postings: 1 2 3 4
John wrote:


>>


>>
>>

>>
>>
>>


>
> Anyway, when I use
>
> document.country.industry.options[3].selected=true;
>
> I get an error.
>
> When I use
>
> var foo=document.getElementById("industry");
> foo.options[3].selected=true;
>
> it's OK.
>
> There's a mystery.
> It's a mystery to me, too. Using Rob G's example,the former is correct, the latter, incorrect. I'm guessing that you are checking this only in IE, am I right?

Mick

 

Page2Go2.com is not responsible for content of this message.