JQuery does not work in IE
<p>I looking more for 'how to troubleshoot' rather than.. the answer is this. Though I obviously wouldn't mind an answer.</p>

<p>Here is my JS.</p>

<pre><code>function listFiles(path) {

        document.path = 'dir='+path;

        $.ajax({
            url: "&lt;?php echo site_url("admin/media/get_folder");?&gt;",
            //data: document.path,
            success: function(data) {
                if (data.error) {
                    alert(data.error);
                    return;
                }

                $.each(data, function(key, arr) {
                    $("#files").append(
                        '&lt;a href="#" class="' + arr.type + 
                           ' row"&gt;'     + key + '&lt;/a&gt;'
                    );
                });
            },
            error: function(e) {
                alert('foo');
            }
        });
        return false;
    }

    listFiles('');
</code></pre>

<p>This is what the JS is being fed.</p>

<pre><code>{"files":{"type":"folder","path":"C:\\xampp\\htdocs\\codeigniter\\uploads\\"},
"images":{"type":"folder","path":"C:\\xampp\\htdocs\\codeigniter\\uploads\\"}}
</code></pre>

<p>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.</p>

<p>EDIT!</p>

<p>In IE the following tests give the following results.</p>

<pre><code>alert(arguments[1]) = parsererror. 
alert(e.status + '\n' + e.statusText); = 200 / OK. 
</code></pre>

<p>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</p>

<p>EDIT EDIT</p>

<p>Found the cause. </p>

<blockquote>
  <p>Could not complete the operation due
  to error c00ce56e</p>
</blockquote>

<p>On looking that up, I found this. <a href="http://support.microsoft.com/?scid=kb%3Ben-us%3B304625&amp;x=10&amp;y=13" rel="nofollow">http://support.microsoft.com/?scid=kb%3Ben-us%3B304625&amp;x=10&amp;y=13</a></p>

<p>How do I properly encode json documents?</p>
