Assign value to Radio button-based on dropdown select
<p>I am currently working on a form, where one of the segment  have a dropdown selection of 2 elements and next to them are  two radio buttons associated to that dropdown.
one of the radio-button is normal(non-input text box) one and the other radio-button is for custom entry input textbox.
The usecase was, user first selects a element in the dropdown and based on the selection, if the user clicks on the first radio button which has no input text box, the value for this radio-button should be assigned based on the dropdown selection..</p>

<p>below is my html code: </p>

<pre><code>&lt;div class="uriDiv input-group"&gt;
  &lt;select class="common authSelect form-control" name="authType" id="authType"&gt;
    &lt;option value=""&gt;
      &lt;spring:message code="newPolicy.selectAuthType"&gt;&lt;/spring:message&gt;
    &lt;/option&gt;
    &lt;option value="DBUser"&gt;DBUser&lt;/option&gt;
    &lt;option value="LDAPUser"&gt;LDAPUser&lt;/option&gt;
  &lt;/select&gt;
&lt;/div&gt;

&lt;div class="auth-permission-rd"&gt;
  &lt;div class="uriDiv radio radio-left"&gt;
    &lt;label&gt;
      &lt;input type="radio" class="common anyuser" value="anyUser" name="authPermission" id="authPermission"&gt;Any User
    &lt;/label&gt;
  &lt;/div&gt;
  &lt;div class="uriDiv radio radio-input"&gt;
    &lt;label&gt;
      &lt;input type="radio" class="common groupuser" value="groupUser" name="authPermission" id="authPermission"&gt;
      &lt;input type="text" name="authPermissionValue" disabled="disabled" class="common form-control-placeHolder" id="authPermissionValue" placeholder="Enter custom Permissions - Comma separated" /&gt;
    &lt;/label&gt;
  &lt;/div&gt;
&lt;/div&gt;
</code></pre>

<p>I should have a jquery code, to assign the value to the radio button..</p>

<p>so if the user selects 'DBUser' from the dropdown and if he selects 'AnyUser' radio button, then jquery functionality needs to assign a value which may be "AnyDBUserValue" to the radio button..</p>

<p>if user selects LDAPUser from the dropdown and if he selects 'AnyUser' radio button, then jquery functionality needs to assign a value for this which may be "AnyLDAPUserValue" to the radio button..</p>

<p>if the user wanted to enter custom value by selecting other radio button, which has input text box, then we need to discard those previous value and takes the custom values entered by the user..</p>

<p>I am a newbie in JQUery and so need help in writing the jquery code for this functionality...</p>

<p>Appreciate the help..Thanks.</p>