I can find a way to get the id = “DropDownListA“. But I have to get the id-value by using this
Somehow $(this).closest('input').attr('id') is not working
<td align="right">
<div class="farvorit_field" id="DivDropDownListA">
<input type="text" id="DropDownListA" name="customerGroup" value="" size="35">
<a href="#" title='See farvorits customers.'>
<img onClick="alert($(this).parent('a').siblings(':text').attr('id'));" src="../img/info.gif" border="0">
</a>
</div>
</td>
Use this.
.parent()will give anchor element and then calling.prev()on it will give theinputelement.Demo