views:

42

answers:

1

I have a form as follows:

<form name="donation_form" action="" method="post" target="_self">
<select  name="donationType" onChange="window.location='?page=donate&amp;donationType='+donation_form.donationType.value;">
<option>--Select--</option>
<option value="a" selected="selected">a</option>
<option value="b" >b</option>
<option value="c" >c</option>
</select>
<input type="text" name="amount"  />
<select  name="giftAid" onChange="window.location='?page='+donate+'&amp;donationType='+a+'&amp;amount='+donation_form.amount.value+'&amp;giftAid='+donation_form.giftAid.value;">
<option>--Select--</option>
<option value="Yes" >Yes</option>
<option value="No" >No</option>
</select>
<input name="submit2" type="submit" value="Make a Donation" />
</form>

Now when I select the second select and it refreshes the page, how do I retain the value of the amount text box that a user has enetered as well as the two selects?

Thanks in Advance

A: 

You should accept answers for your older questions.


You'll need to pass the values of the other controls to the server as querystring parameters, then set the selected values of the options in server-side code (or Javascript) from the querystring.

What are you trying to do?

SLaks
I am trying to refresh the page with the selected value without loosing what the user entered in the text box
Abdul Latif
Why are you trying to refresh the page?
SLaks