I know there's a "select" event but is not working.
This is my code:
$("#Asignacion_Movimiento_OrdenCompra").autocomplete(
"/Asignaciones/ObtenerOrdenesCompra",
{
extraParams: { Serial: function () { return $("#Asignacion_Movimiento_Material").val(); } },
delay: 200,
select: function (event, ui) {
alert(this.value + " - " + ui.item.value);
ObtenerDatosAdicionales();
return true;
}
}
);
I also tried adding:
result: function (event, data, formatted) {
alert(data);
ObtenerDatosAdicionales();
return true;
}
But nothing happens...
How can I get the value of the selected item by the user?
Thx.
You are looking for the result. See here for documentation.
Like so:
$("#Asignacion_Movimiento_OrdenCompra").autocomplete({
/* your options here*/
}).result(function(event, data, formatted) { // result is a separate function
alert(data);
});
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With