Wrox Home  
Search P2P Archive for: Go

  Return to Index  

asp_web_howto thread: List box to list box


Message #1 by Suzilawati Ismail <suzie@u...> on Tue, 27 Feb 2001 16:19:49 +0800
I am new to ASP. I have a problem like this. I want to choose from a list 

box which is return another list box in different frame. For example : 

If  I have one list box that have the list of the car, if I choose one of 

the car, then the result is  another list box with the year made. I hope 

someone can help me on this.



Thanks in advance.



Message #2 by "Alex Shiell, ITS, EC, SE" <alex.shiell@s...> on Tue, 27 Feb 2001 10:34:26 -0000
As long as your first drop down is not too big, you can build up every

possible second drop down seperately, and make them all hidden.  Then when a

selection is made from the first, you can display the appropriate second

one.



If your first drop-down is too big to make this approach practical, build up

lists of arrays on the client side with all the options for the second drop

down, and don't put any options in the second drop-down.  Then when a

selection is made from the first, populate the second from the appropriate

array.



-----Original Message-----

From: Suzilawati Ismail [mailto:suzie@u...]

Sent: Tuesday, February 27, 2001 8:20 AM

To: ASP Web HowTo

Subject: [asp_web_howto] List box to list box





I am new to ASP. I have a problem like this. I want to choose from a list 

box which is return another list box in different frame. For example : 

If  I have one list box that have the list of the car, if I choose one of 

the car, then the result is  another list box with the year made. I hope 

someone can help me on this.



Thanks in advance.



_______________________________________________________________________

Scottish Enterprise Network

http://www.scottish-enterprise.com

Message #3 by Suzilawati Ismail <suzie@u...> on Wed, 28 Feb 2001 09:29:58 +0800
Sorry, I don't have any idea how to display the second one. What is the 

command ... I've tried as below but it's fail to work.



code : anak1.asp



<script language="javascript">



function buat()

{

document.write("<A  target='middle' 

href='javascript:window.location.replace('anak2.asp')></a>")



}

</script>



<form  method="post" action="anak2.asp">

<select name="pilih" size="1" onChange="buat()">

                 <option selected>Sila pilih</option>

                 <option value = "test1">Test1</option>

         <option value = "test2">Test2</option>

               </select>



</form><P>



For anak2.asp, it also content list box.



Thanks......





At 10:34 AM 2/27/01 +0000, you wrote:

>As long as your first drop down is not too big, you can build up every

>possible second drop down seperately, and make them all hidden.  Then when a

>selection is made from the first, you can display the appropriate second

>one.

>

>If your first drop-down is too big to make this approach practical, build up

>lists of arrays on the client side with all the options for the second drop

>down, and don't put any options in the second drop-down.  Then when a

>selection is made from the first, populate the second from the appropriate

>array.

>

>-----Original Message-----

>From: Suzilawati Ismail [mailto:suzie@u...]

>Sent: Tuesday, February 27, 2001 8:20 AM

>To: ASP Web HowTo

>Subject: [asp_web_howto] List box to list box

>

>

>I am new to ASP. I have a problem like this. I want to choose from a list

>box which is return another list box in different frame. For example :

>If  I have one list box that have the list of the car, if I choose one of

>the car, then the result is  another list box with the year made. I hope

>someone can help me on this.

>

>Thanks in advance.

>

>_______________________________________________________________________

>Scottish Enterprise Network

>http://www.scottish-enterprise.com

>







  Return to Index