|
#1
|
|||
|
|||
|
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 |
|
#2
|
|||
|
|||
|
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 |
|
#3
|
|||
|
|||
|
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 > > |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|