Just when I thought I was ready to launch my webapp, IE7 decides to throw a wrench in my plans!
I am using the JQuery Form plugin for uploading data to my server. Everything works perfectly on Chrome and Firefox, but IE7 is giving me an "Object Expected" error. After some investigation, it seems that the issue lies with one specific function. Here's the code snippet causing trouble:
function uploadScript() {
$("#uploadScript").ajaxSubmit({
beforeSend: function() {
$("#uploadScript").attr("disabled", true);
},
dataType: "json",
cache: false,
success: function(response, status, xhr) {
if(response != undefined) {
commandArray = ([]).concat(response.command);
paramsArray = ([]).concat(response.params);
IDArray = ([]).concat(response.id);
commandID = response.commandID;
updateScriptView();
}
}
})
}
I've tried setting the response header content type to 'application/json' and checked the JSON syntax thoroughly, but the problem persists. Any insights on what could be going wrong?
UPDATE: The JSON response looks like this:
{ "command" : ["sequential","wait","tune","endsequential"],"params" : [["5"],["00:00:03"],["202","RA29B[*]"],["100000"]],"id" : [100000,100002,100003,100001],"commandID" : 100004}
Prettified version:
{
"command": [
"sequential",
"wait",
"tune",
"endsequential"
],
"params": [
[
"5"
],
[
"00:00:03"
],
[
"202",
"RA29B[*]"
],
[
"100000"
]
],
"id": [
100000,
100002,
100003,
100001
],
"commandID": 100004
}
SOLVED! It turns out that the $.attr() call in the beforeSend option of ajaxSubmit() was causing issues in IE7. Removing this block of code resolved the problem. Thank you for all the assistance provided!