The html code snipped is
<tr>
<td>Wi-Fi Access Cards</td>
<td><input type="text" name="adj_accname_n" id="adj_accname_Id1" value="Electronic Recharge for Nawras Ajel"></td>
<td><input type="text" name="adj_acccode_n" id="adj_acccode_Id1" value="420650"></td>
<td><input type="text" name="adj_prodname_n" id="adj_prodname_Id1" value="Electronic Recharge for Nawras Ajel"></td>
<td><input type="text" name="adj_prodcode_n" id="adj_prodcode_Id1" value="240010"></td>
<td><input type="text" name="adj_channelcode_n" id="adj_channelcode_Id1" value="710300"></td>
<!--<td><input type="submit" name="adj_button_n" id="adj_button_Id1" value="Modify"></td>-->
<td><button>Modify</button></td>
</tr>
The above code snippet has one modify button for each row. Likewise there are many rows each with the modify button.
When the user click on the modify button, all the values in the input field of that row should be retrieved.
The below code retrieves the html properly
$("button").click(function(){
alert($(this).parent().siblings().eq(1).html());
});
But when I replace the html() with val() it returns blank where I as expecting the value from the input field
$(this).parent().siblings().eq(1).find('input').val()