IE9 jQuery Ajax not working

I am using jQuery 1.6.1 and IE9. I run the page on my machine, trying to request data from the server. My Javascript looks like this:

var baseURL = "http://1.1.1.1/cgi-bin/ipcxml.cgi?";
var path = "scm:scm/data/system_names";
var fullURL = baseURL + path;
$.ajax (
    {
        url: fullURL,
        cache: true,
        context: $("#" + element),
        crossDomain: true,
        dataType: "xml",
        type: "GET",
        success: function (data) {
        alert (data);
        }
    }
);

When I run this code and watch the network traffic in the IE developer tools, I don’t see the request coming out. Anyone have any thoughts?

+3
source share
2 answers

I don't know if this is the main cause of your problem, but the colon ( :) and slash ( /) characters must be encoded when used in query strings. Try:

var fullURL = baseURL + encodeURIComponent(path);
+1
source

, , . , , :

cache:false

IE , , . , .

+4

All Articles