jQuery + Web Service + Cross Domain -


i have web service , calling jquery, works fine until remain on same server, when try call service other domain don't please me. below code :

$.ajax({ type: 'post', url: 'http://-----------/service.asmx/bulkupdate', data:"{'caseid': '"+caseid+"'}", contenttype : "application/json; charset=utf-8;", "datatype" : "json",  success: function(xdata, status)  { alert(xdata.d); } ,error : function(xhr) { alert(xhr.responsetext);  } }); 

try using jsonp, if cross domain issue. below

"datatype":"jsonp" 

or

you can configure server allow request other domain. fine think.

hope solves question.


Comments

Popular posts from this blog

user interface - Python attempting to create a simple gui, getting "AttributeError: 'MainMenu' object has no attribute 'intro_screen'" -

jquery - Common JavaScript snippet to share files on Google Drive, Dropbox, Box.net or SkyDrive -

Android Gson.fromJson error -