I have the following jQuery to update a drop down list based on the selected value of another drop down list:
$("#FirstDropDownList").change(function () {
$.get('/MyController/GetSecondDropDownListValues/' + $(this).val(), function (response) {
var ddlValues = $.evalJSON(response);
var ddlSecondDropDownList = $("#SecondDropDownList");
// clear all previous options
$("#SecondDropDownList> option").remove();
// populate the values of SecondDropDownList
for (i = 0; i < ddlValues.length; i++) {
ddlSecondDropDownList.append($("<option />").val(ddlValues[i].Id).text(ddlValues[i].Name));
}
});
});
It seems the callback only works when the submit button is pressed.
It seems the browser is throwing a 404 error. It works fine in Chrome, IE7+, Firefox etc. Unfortunately our client uses IE6.