Return to Snippet

Revision: 46263
at May 15, 2011 19:57 by cmcginn


Updated Code
var FaxService={
	ServiceEndpoint:'http://localhost:19414/Service/',
	FaxServiceOrder:null,
	callService:function(serviceName,cb){
		$.ajax({
		  type: "GET",
		  url: url+serviceName,  
		  contentType: "application/json; charset=utf-8",
		  dataType: "json",
		  complete:cb 
		});
	},
	getNewFaxServiceOrder:function(){
		FaxService.callService('GetNewFaxServiceOrder',function(data)
		{
			FaxService.FaxServiceOrder = data;
		});
	}
}

Revision: 46262
at May 15, 2011 18:31 by cmcginn


Updated Code
var url='http://localhost:19414/Service/GetNewFaxServiceOrder';
var x=null;
jQuery.getJSON(url+"?callback=?", function(data) {
    x=data;
});
x;

Revision: 46261
at May 15, 2011 18:05 by cmcginn


Initial Code
$.ajax({
    url:'http://localhost:19414/Service/GetNewFaxServiceOrder',
    type: "GET",
    processData: false,
    contentType: "application/json",
    timeout: 10000,
    dataType: "json",  
    success:function(data)
    {
        console.log(data);
    }
});

Initial URL

                                

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

Initial Title
Cross Domain Call JQuery

Initial Tags

                                

Initial Language
jQuery