My MVC app is experiencing JSON request failures in Firefox but works fine on IE and Chrome. I initially suspected the same-origin policy, but all requests are using the same host and protocol (localhost). Upon inspecting the network functions of each browser's debugger, it appears that IE and Chrome are receiving responses with 270b, while Firefox only gets 2b. Any assistance would be greatly appreciated.
Code:
$(function () {
// Works in FF and IE
var IncludeTerminatedFlag = getIncludeTerminatedFlag();
$.getJSON("/Search/GetDebtorList", { DebtorNameCode: '', CountryCode: CountryCode, IncludeTerminatedFlag: IncludeTerminatedFlag }, function (data) {
// some actions
});
// Works in FF and IE
$.getJSON("/Search/GetStaffList", { StaffNameCode: '', CountryCode: CountryCode, IncludeTerminatedFlag: IncludeTerminatedFlag }, function (data) {
// some actions
});
// Works in FF and IE
$.getJSON("/Search/GetStaffList", { StaffNameCode: '', CountryCode: CountryCode, IncludeTerminatedFlag: IncludeTerminatedFlag }, function (data) {
// some actions
});
// Fails in FF but works in IE
$.getJSON("/Search/GetClientList", { ClientNameCode: '', CountryCode: CountryCode, IncludeTerminatedFlag: IncludeTerminatedFlag }, function (data) {
// some actions
});
}
EDIT: While debugging in Firefox, it appears that the last $.getJSON call fails to execute or enter the function. The issue persists even when attempting the $ajax syntax.