p4pradeep@hotmail.com (PT) wrote in message news:<2d868f1e.0410140132.9e5c2ae@posting.google.c om>...[color=blue]
> I got a form with many text boxes, checkboxes and 3 drop downs. From
> that 3, 2 are dependant. I can choose one drop down, and the next drop
> down should display the dependant values of the first drop down
> chosed. And I have a submite button to submit all these values to DB.
>
> First problem: I cant keep the value of the selected text in the first
> drop down. It always goes back to the first value. (but the asp site
> extension changes accordingly).[/color]
You need to retrieve the value of the drop down, and put a "SELECTED"
tag next to the item which is currently active. I.e., let's say you
have a drop down with values 1, 2, and 3. 2 is chosen. The ASP would
say something like:
<select name="period">
<option value="1" <%if period="1" then
response.write("selected")%>>One</option>
<option value="2" <%if period="2" then
response.write("selected")%>>Two</option>
<option value="3" <%if period="3" then
response.write("selected")%>>Three</option>
</select>
[color=blue]
> Second problem: when the value of second drop down is updated, then
> the text I inserted in those text boxes, and the checkboxes i checked
> disappears!
>
> I know its because the site is submitted again to update the second
> drop down. But how could I keep the values of other elements even
> though the drop down is updated?[/color]
You have to retrieve the values of EVERY element on your page, and set
the initial value of those text boxes, check boxes, etc, to those
values retrieve when the page is refreshed.