Hello,
I looking more for 'how to troubleshoot' rather than.. the answer is this. Though I obviously wouldn't mind an answer.
Here is my JS.
function listFiles(path) {
document.path = 'dir='+path;
$.ajax({
url: "<?php echo site_url("admin/media/get_folder");?>",
//data: document.path,
success: function(data) {
if (data.error) {
alert(data.error);
return;
}
$.each(data, function(key, arr) {
$("#files").append(
'<a href="#" class="' + arr.type +
' row">' + key + '</a>'
);
});
},
error: function(e) {
alert('foo');
}
});
return false;
}
listFiles('');
This is what the JS is being fed.
{"files":{"type":"folder","path":"C:\\xampp\\htdocs\\codeigniter\\uploads\\"},
"images":{"type":"folder","path":"C:\\xampp\\htdocs\\codeigniter\\uploads\\"}}
When I run in IE9 I get back foo. I can't locate my IE8 install unfortunately but it would be good to debug this anyway.
EDIT!
In IE the following tests give the following results.
alert(arguments[1]) = parsererror.
alert(e.status + '\n' + e.statusText); = 200 / OK.
When I copy the javascript URL from the IE source into the IE browser bar the url loads fine and prompts me to download the json file
EDIT EDIT
Found the cause.
Could not complete the operation due to error c00ce56e
On looking that up, I found this. http://support.microsoft.com/?scid=kb%3Ben-us%3B304625&x=10&y=13
How do I properly encode json documents?