I am using the following formular:
ROW1: <input class="search" name="pos[]" value=""><input name="str[]" value="">
ROW2: <input class="search" name="pos[]" value=""><input name="str[]" value="">
ROW3: <input class="search" name="pos[]" value=""><input name="str[]" value="">
For the first input of each row I activated jquery autocomplete:
$(".search").autocomplete(ac_new_invoice);
var ac_new_invoice = {
source: "productsearch.php",
minLength:1,
select: function(data){
var str = document.forms[0].elements["str[]"];
str[1].value = '1.000,00';
}
}
So it works fine when I type
str[1].value = '1.000,00';
But what i want is that if I type in row 1 the input str in row 1 will be changed. But how do I get the row in which the autocomplete is performed from?
Thanks in advance!