views:

48

answers:

1

Hi All

I have a .Net web service that I call from javascript using:

$.ajax({ type: "POST", url: "http://myServerIP/Myervice.asmx/MyMethod",
                 data: "{}",
                 contentType: "application/json; charset=utf-8",
                 dataType: "jsonp",
                 success: function(msg) { alert('sucess ' + msg); },
                 error: function(XMLHttpRequest, textStatus, errorThrown) { alert(XMLHttpRequest); alert(textStatus); alert(errorThrown); }
             });

I get a success message in IE7 and in Firefox I don't get any decent errors back just 'error' and 'undefined'

I suspect this is due to the fact that I'm on an Intranet here and IE7 is taking my credentials and passing them to IIS on 'myServer' on my behalf while other browsers cannot.

Is this the case?

How do I go about fixing this problem?

Thanks in advance

Davy

+1  A: 

Maybe there is something going on with the datatype 'jsonp'. Read this, try using a different datatype..

Andre Haverdings