How to get the value of a textbox right next to the modified textbox in a TD?
I have a table and I want to get the value of the next textbox that is right next to the modified textbox.
I tried next().val() but it doesn't work.
- <tr>
- <td><input type="text" id="amid" class="amount" width="140px" /> </td>
- <td><asp:TextBox ID="dorc" class="d_orc" runat="server" Width="140px"></asp:TextBox> </td></tr>
I wanna get the amount of "amid" and then check the next textbox whether it is Debit or Credit to insert it into its array.
I tried the following code, but no luck.
- $('#amid').live('keyup', function () {
- alert( $("#amid").next().val());
- }