I have a radio button which on click enables a drop down and on selection of different values from drop down, different checkboxes gets shown.
Now i want to retain the selection of radio button - followed by selection of drop down values and its check box on page load.
Design looks something like:
If i select only 3rd radio button, the drop down gets enabled.
Problem:
On page refresh, the radio button again gets selected to 1st one.
Below are the ids of different controls.
1) For the Preference drop down:
<select name="Keys[]" id="key_" rel="" class="key-class" onchange="return getPreferenceValues(this, '');">
Key :
<option value="" alt="">Choose one</option>
<option value="25/checkbox//" alt="25">
Gender </option>
<option value="26/checkbox//" alt="26">
Marital Status </option>
<option value="27/radio//" alt="27">
Education Status </option>
<option value="28/checkbox//" alt="28">
Employment Status </option>
<option value="29/checkbox//" alt="29">
Professional Status </option>
<option value="30/checkbox//" alt="30">
Interests </option>
<option value="31/checkbox//" alt="31">
Age </option>
<option value="40/date/range/" alt="40">
DOB </option>
<option value="52/text//" alt="52">
Home City/Town </option>
<option value="53/text//" alt="53">
Year of Birth </option>
Delete
2) For the checkbox:
<span id="valueResponse_" class="valueResponse-class"> Value :
<label id=""><input class="targetSetting" type="checkbox" name="Values[25][]" id="value_" value="207">Male</label>
<label id=""><input class="targetSetting" type="checkbox" name="Values[25][]" id="value_" value="208">Female</label>
<label id=""><input class="targetSetting" type="checkbox" name="Values[25][]" id="value_" value="209">Other</label>
<label id=""><input class="targetSetting" type="checkbox" name="Values[25][]" id="value_" value="0">Any</label>
<span style="color:red;" class="value-error-class" id="value_error_"></span>
</span>
Radio button code:
<input class="targetSettingRegisteredUsers inputabs" type="radio" id = "all_reg_users" name="target_criteria" value="registered_users" onclick="allregisteredCountFun()" checked="checked"> Select All Registered Users<br><br>
<input class="inputabs" type="radio" id = "all_optedIn_users" name="target_criteria" value="optedin_users" onclick="optedinCountFun();"> Select All Opted-In Users<br><br>
<input class="inputabs" type="radio" id ="pref_checkbox" name="target_criteria" value="preference_based_users" onclick="preferenceBasedCountFun()"> Select based on preference<br><br>