I have two different select option:
Html:
<select id="lstProveedor" class="form-control select2 select2-accessible" aria-hidden="true"></select>
<select id="lstcuadrilla" class="form-control select2 select2-accessible" aria-hidden="true"></select>
Function:
function getCuadrilla(sender) {
sender.addClass("changed");
$("#lstcuadrilla")
.getJSONCatalog({
onSuccess: function(response) {
console.log(response);
},
url: '/Agenda/GetCuadrillas/' + "?ProveedorID=" + ID,
valueProperty: "ID",
textProperty: "NombreComercial"
});
}
$("#lstProveedor")
.getJSONCatalog({
url: '/Agenda/GetProveedores',
valueProperty: "ID",
textProperty: "NombreComercial",
onChange: getCuadrilla()
});
I want to know how to send valueProperty from $("#lstProveedor") to $("#lstcuadrilla") to get into url: '/Agenda/GetCuadrillas/' + "?ProveedorID=" + ID, on change event, how can I do that?
I try to access it sending into onChange event like:
onChange: getCuadrilla(valueProperty)
then call into function
function getCuadrilla(sender,valueProperty)
but it don´t works. Regards
valueProperty: varProperty