I have a simple html form with 3 fields. First field is “Select date range”, in which I have a number of options including “Enter Date Range…”. After this field I have “From” and “To” fields in which the user can manually enter dates. I want to be able to change the value of the “Select date range” field to “Enter Date Range…” when the user enters a value in the “From” or “To” fields. This is a simplified version of the form code:
[CODE]
Select date range:
<select name=”daterange”>
<option>All dates</option>
<option>Past 1 month</option>
<option>Past 3 months</option>
<option>Past 6 months</option>
<option>Past year</option>
<option>Enter date range…</option>
</select>
From (DD-MM-YYYY):
<input type=”Text” name=”input1″ value=””>
To (DD-MM-YYYY):
<input type=”Text” name=”input2″ value=””>
Thanks very much in advance. Any help greatly appreciated.