I have a Dropdown under two DIV. On change of the value, i am making an AJAX request. After that i am getting value and stored in a variable. Now i need to set the received value to the current DIV's parent parent siblings child. Refer the below code.
<div class="parentcontainer">
<div class="ui-block-a">
<div class="psFieldLabel">Attendee</div>
<div class="psFieldInput">
<select name="namelist" id="nameListId" maxlength="50" class="required attendeeName">
<option></option>
<option value="Hari">Hari</option>
<option value="Ramesh">Ramesh</option>
<option value="Kumar">Kumar</option>
</select>
</div>
</div>
<div class="ui-block-b">
<div class="psFieldLabel">Description</div>
<input type="text" name="descriptionName" id="descriptionId" value="0" class="psName description" />
</div>
</div>
In My Javascript: onchange of "attendeeName" select class i am making a Ajax call and getting value. But i am not able to push the received value to "descriptionName" class.
NOTE: On a button Click i am generating the above mark-up("parentcontainer" class) several time dynamically. So whenever i change the dropdown value, corresponding description value should be updated. But not on the next "parentcontainer".
Tried this, But its not working:
$(this).parent().parent().siblings(".description").val(ajaxResult);