|
 |
asp_web_howto thread: selecting values
Message #1 by "casmur" <casmur@h...> on Tue, 20 Mar 2001 00:38:26
|
|
I was hoping someone could help with some code sample on how to preselect
an existing value from two dropdowns.
I have two dropdowns boxes with the following values:
Test1
Test2
Test3
My second dropdown box has the following values:
Check1
Check2
check3
I want to be able to automatically preselect the value check2 from
dropdown box two at soon as the user select test box 1.
Thanks all for your support!
CC
Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 20 Mar 2001 12:10:41 -0000
|
|
<SELECT NAME="DD1" ID="DD1" ONCHANGE="selectItem(DD2, 1)">
<OPTION>Test1</OPTION>
etc...
</SELECT>
<SELECT NAME="DD2" ID="DD2">
<OPTION>Check1</OPTION>
etc...
</SELECT>
<SCRIPT language="javascript">
function selectItem(oDD, iIndex){
oDD.selectedIndex = iIndex;
}
</SCRIPT>
-----Original Message-----
From: casmur [mailto:casmur@h...]
Sent: Tuesday, March 20, 2001 12:38 AM
To: ASP Web HowTo
Subject: [asp_web_howto] selecting values
I was hoping someone could help with some code sample on how to preselect
an existing value from two dropdowns.
I have two dropdowns boxes with the following values:
Test1
Test2
Test3
My second dropdown box has the following values:
Check1
Check2
check3
I want to be able to automatically preselect the value check2 from
dropdown box two at soon as the user select test box 1.
Thanks all for your support!
CC
|
|
 |