$.jsonp({ //async: true, //crossDomain: true, type: 'GET', timeout: 10000, url: 'http://sys108/vbr/Handler.ashx?imgURL=' + encodeURIComponent(imageURL) + '&type=crossDomainImage', dataType: 'jsonp', contentType: "application/json; charset=utf-8", success: function (data) { console.log(data.ImageData); }, error: function (data) { console.log('error'); } });
string imgData= processCrossDomainImage(""); context.Response.ContentType = "text/javascript"; string strJson = "{ \"ImageData\" : \"" + imgData + "\" }"; //if (context.Request.QueryString["callback"] != null) //{ // strJson = context.Request.QueryString["callback"] + "(" + strJson + ")"; //} context.Response.Write(strJson);
{ "ImageData" : "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAICAgICAQICAgIDAgIDAwYEAwMDAwcFBQQGCAcJCAgHCAgJCg0LCQoMCggICw8SPzI5+pJ/DAr8zxPHfFuPrKdXH1XZp6TaV+mkWl+HkfT08nwGGhpRjrpblW3XW1/L/hj8z/AA/qi634L03VAArXMCs6jorY5Faxb1s2k9F5JdvmdGEwFDLqXsqXXVt7vt919A5AA6Y7UUi/6tfpS1+yHcFFFFAH/2Q==" }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)