Click here to Skip to main content
15,559,287 members

Comments by Member 14164795 (Top 4 by date)

Member 14164795 22-Aug-19 10:32am View    
This did not work for me, however I found my problem :) I was trying to remove the model state before setting my values to what I wanted, not after!
Member 14164795 9-May-19 11:39am View    
Progress.. Now when I make selection and Search, it uses the default value 0 instead of the id I've selected.
Member 14164795 1-May-19 8:11am View    
Here's what I've attempted:

var employee = document.getElementById('employee');
employee.addEventListener('change', UpdateGroup);
function UpdateGroup() {
$.ajax({
type: 'post',
url: '/edit?handler=searchcurrgroup',
contenttype: "application/json; charset=utf-8",
datatype: 'json',
data: '{}',
async: 'true',
success: function (data) {
OnSuccessed(data.subGroup) {
document.getElementById('subgrpnm').append(subgroupQuery);
}
OnSuccessed(data.group) {
document.getElementById('grpnm').append(groupQuery);
}
}
})
}


Still, nothing happens
Member 14164795 1-May-19 7:44am View    
Thank you. I've set variable "result" to pass both of my variables as a JsonResult:
var result = new { subgroupQuery, groupQuery };
return new JsonResult(result);

My next question is, how do I set the result for my group and subgroup fields in the js/html now? The article I reference is confusing.