Hi, I've been struggling w/ this problem since yesterday, but I can't figure out why i keep getting error messages "... is not a function". Here's the HTML code
<td>
<input class="itemAC" name="Item[0][name]" id="Item_0_name" type="text" value="" />
<input class="itemId" name="TransactionDetail[0][itemId]" id="TransactionDetail_0_itemId" type="hidden" value="" />
</td>
JS Code:
$(".itemAC").autocomplete("/inventory2/index.php?r=item/AjaxLookup",{
'minChars':2,'delay':500,'matchCase':false,'max':10}
).result(function(event,item){alert(this.next().id)}
);
and I got "this.next is not a function" error, I tried $(this).next, $("#"+this.id).next and I got the same error message, what am I doing wrong?
Edit: Ok, so I tried to remove almost all of the HTML and JS codes so that the HTML body contains: