I have such code:
var regions = [{'label': 'array', 'value': '1'}]; //default values
$("#auto1").select({
regions = jQuery.parseJSON( //updating process
$.ajax({
type: 'POST',
url: '/ajax/place/',
data: { country: value }
})
);
return false;
});
$("#auto2").some_func({
initialValues: regions, //here must be updated values, but it's not
});
I think it is understandable from above code: when page loaded, element #auto2 has default values, but when I select smth from #auto1 it must be updated, but it’s not.
How can I update the values corresponding to data value.
Thanks!
1 Answer