getjson

Accessing DailyMile API with AFNetworking 2.0

雨燕双飞 提交于 2019-12-25 02:09:46
问题 So I'm making a JSON request from an https site (after retrieving the auth token) and like a dozen other problems with AFNetworking on stack overflow, I'm getting this error: Error Domain=NSCocoaErrorDomain Code=3840 "The operation couldn’t be completed. (Cocoa error 3840.)" (JSON text did not start with array or object and option to allow fragments not set.) UserInfo=0x8dc2860 {NSDebugDescription=JSON text did not start with array or object and option to allow fragments not set.} The code I

After Refresh dont append the same data

可紊 提交于 2019-12-25 00:48:44
问题 im using for first time appcelerator for a Iphone app, im using a TableViewRow, when the window load all is fine, but if i want to refresh the window, the TableViewRow repeat the same data every time that i push refresh, so, i have 5 Categories, after refresh im having the same Categories repeting every time that im trying to refresh. Ti.UI.backgroundColor = '#dddddd'; var url = "http://remoteJSON.js"; var win = Titanium.UI.currentWindow; var table = Titanium.UI.createTableView(); var

How to get the JSON data into a string from a .js file

别说谁变了你拦得住时间么 提交于 2019-12-24 16:44:13
问题 I have a js file which contains createTable(// Create statistics table and // Creates APDEX table) . I need to get the // Create statistics table values into a string so that I can copy that to an Excel using json2xsl. Is there any way to get those "Create statistics table" data values into a string? I have attached my js file here function summaryTableHeader(header) { var newRow = header.insertRow(-1); newRow.className = "tablesorter-no-sort"; var cell = document.createElement('th'); cell

Highcharts .getJSON - chart not plotting

五迷三道 提交于 2019-12-24 14:43:22
问题 Previous help here has got me to the current stage with my Highcharts project, however I am still hitting a major stumbling block. Highcharts chart is not loading data retrieved using .getJSON. I am at a loss as to why the html is not rendering the chart and load the data from data.php. All code below, does anyone have any ideas? @PawełFus php <?php $con = mysql_connect("ip_address","root",""); if (!$con) { die('Could not connect: ' . mysql_error()); } mysql_select_db("test", $con); $result =

modify getJSON to work with CORS

拈花ヽ惹草 提交于 2019-12-24 12:12:35
问题 I am looking for ways to allow cross-domain access using $.getJSON. I came across solutions which suggest that using CORS is the solution to this problem. But most of the solutions have a general ajax format. I cannot use JSONP since I get data from a server which I do not have access. Is there a way to modify this code using $.getJSON to get the data? $.getJSON(jsonURL, function(res){ console.log(JSON.stringify(res)); }); Or do I have to use ajax format for CORS? 回答1: Server which I do not

cant get data from json list

时间秒杀一切 提交于 2019-12-24 10:11:38
问题 so far i made a list of airlines and their prices for each flight, and now i want to get all the information about these flights from json list, any way here are the functions: first function works fine: function show_airlines() { $.getJSON("http://api.anywayanyday.com/api/NewRequest/?Route=2406MOWLON&AD=1&CN=0&CS=E&Partner=testapic&_Serialize=JSON&callback=?", function(data) { var id=data.Id; $('#search_id').attr('rel',id); $.getJSON("http://api.anywayanyday.com/api/Fares/?R="+id+"&V=Matrix

asp.net mvc 3: deployment. getJson urls don't work

断了今生、忘了曾经 提交于 2019-12-24 03:12:48
问题 I have a very simple asp.net mvc3 app that uses jquery::getJSON to call into my controller and get some data top display via jquery::tmpl. function ajaxError(jqXHR, textStatus, errorThrown) { alert(errorThrown); } .... $.ajaxSetup({ cache: false, error: ajaxError // tell me what the error was }); var cl = $("#listcontainer"); $(cl).empty(); $.getJSON("/Home/GetSomeData", { oldData: "" }, function (data) { $.each(data, function (i, item) { var t = $("#listitem").tmpl(item); $(cl).append(t); })

asp.net mvc 3: deployment. getJson urls don't work

这一生的挚爱 提交于 2019-12-24 03:12:40
问题 I have a very simple asp.net mvc3 app that uses jquery::getJSON to call into my controller and get some data top display via jquery::tmpl. function ajaxError(jqXHR, textStatus, errorThrown) { alert(errorThrown); } .... $.ajaxSetup({ cache: false, error: ajaxError // tell me what the error was }); var cl = $("#listcontainer"); $(cl).empty(); $.getJSON("/Home/GetSomeData", { oldData: "" }, function (data) { $.each(data, function (i, item) { var t = $("#listitem").tmpl(item); $(cl).append(t); })

How to check for connectivity with server using javaScript from native Android 2.1 browser?

為{幸葍}努か 提交于 2019-12-24 00:06:57
问题 I am building a web application that needs to be working seamless when being online or off line. For this need to be able to check my connection with the server . The main devices that are to be supported are iphone3+4, ipad, a netbook with chrome and android 2.1+. The navigator.onLine is not exactly what I am looking for. This is unreliable and only checks if you have connectivity, not if you are connected to a specific server. I tried jQuery.getJSON to connect to a ping web-service on my

JSON to JQuery: What am I doing wrong?

我怕爱的太早我们不能终老 提交于 2019-12-23 12:16:34
问题 I'm fairly new to javascript and jquery development. I have a table of values I'm fetching in PHP and formatting as a JSON string, because JSON looks like a great way to get data into javascript. But I'm having trouble addressing the javascript variable. The JSON data is in a very simple format. It looks like this: [ {"id":"1","name":"Bob","haircolor":"brown"}, {"id":"2","name":"Carol","haircolor":"Red"} ] And so on. None of the entries are complex. It's just flat rows of data. I'm using $