I found more easy :)
$('#id').autocomplete('file.php',{
width: 300,
selectFirst: false
}).result(function(event, data, formatted) {
$('#id_user').val( data[1] );
});
Thanks anyway :)
You can use array.
var arr = new Array();
arr['Some Text 1'] = 41;
arr['Some Text 2'] = 42;
arr['Some Text 3'] = 43;
arr['Some Text 4'] = 44;
arr['Some Text 5'] = 45;
alert(arr['Some Text 4'])
On Sep 10, 12:43 am, TiGeRWooD wrote:
> Hi,
I found out I can do:
var data = {};
data.x = {
a: [],
b: [],
c: [],
d: [],
e: []
}
data.x.a.push({
name: "foo",
num: 0
});
data.x.a.push({
name: "foo2",
num: 0
});
$(data.x.a).filter('[num=0]')
or
$(data.x.a).filter('[n
3 matches
Mail list logo