Actually, I have implemented that exact scenario on one or
two of my pages.
Basically I have two select boxes with some size greater
than one (so that it will display more than one line).
Then I use javascript to copy the selected value from the
first select box to the second.
Then, when the page is submitted, I read the values in the
2nd select box and populate an array with that data using
javascript.
Next, again using javascript, I copy the contents of the
array to a hidden text field on the form.
Finally, I submit the form, again using javascript.
I know this sounds complicated, but there are no reposts,
or roundtrips to the server except for the final posting
of the form. The entries get added to the 2nd select box
immediately and they all get processed at one time when
the page gets submitted. I also have code to delete any
entry from the 2nd select box using roughly the same
process (in reverse).
Note: the reason for populating the array and not the
hidden text field directly is so that I can sort the
entries before processing the page - makes it a little
easier to check for duplicate entries when updateing the
SQL database. If you don't need to sort, you could
populate the text field directly from the select box.
HTH,
John
-----Original Message-----
I want an ASP page with a dropdown and a simple button.
Every time the userchooses an item from the dropdown and clicks on the
button i want that valuewritten below in list and allow user to select more.
Also how can these choices be saved somehow so tha when
the user goes to thenext page the choices he made can be written to the
database.
For example
The choices in the dropdown may be
London
Dublin
Paris
New York
When the user chooses Dublin I want ti written below the
dropdown. Then whenhe chooses New York. I want it added to london. so that
it displays
Dublin
London
Then when he click next button these two choices are
taken over to the nextpage where an insert query can be used to insert them
into the db.
.