March 12, 2012

Doesn't Internet explorer support $.ajax method?

Question by user1089964

I am getting a problem when I am trying to invoke the $.ajax() method in Internet Explorer.

My code is:

$.ajax({
    type: "GET",
    url: "http://my_server/resource.php",
    success: my_function
});

When I am testing this in any browser I get the proper answer, but if I’m using Internet Explorer, it only takes the url: http://my_server/ where the resource.php part is left out and the response is empty.

Any suggestions? Should I send the resource.php part in the data field?

Answer by Starx

Yes, it DOES work

If that’s your current code, then there is incorrect definition of function . You have to use

success: function() { 
//.....
}

Author: Nabin Nepal (Starx)

Hello, I am Nabin Nepal and you can call me Starx. This is my blog where write about my life and my involvements. I am a Software Developer, A Cyclist and a Realist. I hope you will find my blog interesting. Follow me on Google+

...

Please fill the form - I will response as fast as I can!