p2p.wrox.com Forums

Need to download code?

View our list of code downloads.

  Return to Index  

proasp_howto thread: Re: Multiple Select Boxes

Message #1 by avivit@m... on Thu, 16 Aug 2001 16:03:12
renata, do not forget to let us know what r u doing eventually to make it 
work. It is important.

Now, I tried to use arrays for the exact thing u r trying to do, but 
eventually I left it, because it annoyed me to switch the array/str from 
vbscript to jscript, and also I had long strings so it caused problems, 
encoding and splitting stuff.
So I switched to another option, which I like less, but it is working for 
me now:

on onChange event of the main select box, I kept the value of the selected 
option and index, and sent it to the same asp page (with the values), and 
then I requested these values, thus, selecting (again) the option the user 
chose, and created the options for the "sub-selectbox" from the beginning 
(don't forget I redirected to the same page, and this page is createing 
the select boxes. If no values r sent (first time it is opened), then it 
creates all options for both select boxes. But if a choise is made, than 
according to the value recieved, I created the right options by using sql 
statement, and entering the results to the options of the sub-select-box).

I hope I am clear. 

  Return to Index