-
Change select from other select
I am able to change what is selected in one select box when changing the selection
in another select box using the onChange event in IE, but it does not work
in Netscape. By passing
a value to the following line of code, it does nothing in Netscape:
document.general.SelectObjectName.options.value = passedValue;
How can I get this to work in Netscape and IE?
Thanks,
Brian
-
Re: Change select from other select
Just a guess, but it looks like you're missing an index value. The code
should be:
document.general.SelectObjectName.options[index].value = passedValue;
"Brian" <bminisi@accessgroup.org> wrote in message
news:3a6de423$1@news.devx.com...
>
> I am able to change what is selected in one select box when changing the
selection
> in another select box using the onChange event in IE, but it does not
work
> in Netscape. By passing
> a value to the following line of code, it does nothing in Netscape:
>
> document.general.SelectObjectName.options.value = passedValue;
>
> How can I get this to work in Netscape and IE?
>
> Thanks,
>
> Brian
-
Re: Change select from other select
The correct syntax is:
document.formName.selectName.options[document.formName.selectName.selectedIndex].value
where you have to change "formName" and "selectName" to respectively the
names of your form and select box.
cya
Frederiek
"Russell Jones" <arj1@northstate.net> wrote:
>Just a guess, but it looks like you're missing an index value. The code
>should be:
>document.general.SelectObjectName.options[index].value = passedValue;
>
>
>"Brian" <bminisi@accessgroup.org> wrote in message
>news:3a6de423$1@news.devx.com...
>>
>> I am able to change what is selected in one select box when changing the
>selection
>> in another select box using the onChange event in IE, but it does not
>work
>> in Netscape. By passing
>> a value to the following line of code, it does nothing in Netscape:
>>
>> document.general.SelectObjectName.options.value = passedValue;
>>
>> How can I get this to work in Netscape and IE?
>>
>> Thanks,
>>
>> Brian
>
>
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
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks