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: John
Date: Fri, 23 Mar 2007 10:11:35 -0500
Related Postings: 1 2 3 4
"RobG" wrote in message news:1174657136.184617.182340@n76g2000hsh.googlegroups.com...
> On Mar 23, 11:09 pm, "John" wrote:
>> Hi
>>
>>

>
> Dunno about "nam", it might be better to include a *name* attribute.
>
>>
>
>
>
>
>
>

>
>
>
>
>
> --
> Rob
>

Hi

The nam and industy were typos.

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.

Regards John

-------------------------------------------------------------------------------- I am using the free version of SPAMfighter for private users. It has removed 91248 spam emails to date. Paying users do not have this message in their emails. Try SPAMfighter for free now!

 

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