Posted By

cmcginn on 05/15/11


Tagged

RestAjaxMVC


Versions (?)

Cross Domain Call JQuery


 / Published in: jQuery
 

This will successfully retrieve cross domain without 302 using Complete avoids 200 statusText with "parsererror"

  1. var FaxService={
  2. ServiceEndpoint:'http://localhost:19414/Service/',
  3. FaxServiceOrder:null,
  4. callService:function(serviceName,cb){
  5. $.ajax({
  6. type: "GET",
  7. url: url+serviceName,
  8. contentType: "application/json; charset=utf-8",
  9. dataType: "json",
  10. complete:cb
  11. });
  12. },
  13. getNewFaxServiceOrder:function(){
  14. FaxService.callService('GetNewFaxServiceOrder',function(data)
  15. {
  16. FaxService.FaxServiceOrder = data;
  17. });
  18. }
  19. }

Report this snippet  

You need to login to post a comment.