Community Questions & Answers

JSON http request working example here

I looked around and saw several questions about how to make this work, but no complete example for noob's like me. (or at least I didn't find one) So here is one: **sample.php** ~~~ <?php echo...

Alert Local Json

I would like to alert the value of JSON and then specific ones. index.xml ~~~ <Alloy> <Window class="container"> <Label id="label" onClick="doClick">Hello,...

JSON Alloy

How would i code this in alloy? I'm unfamiliar how to connect tss, xml, and js. ~~~ (function(){ var win=Ti.UI.createWindow( { backgroundColor:'white'...

Can not post JSON to server

Ex:- ~~~ var url = "http://192.168.1.100/test.php"; var xhr = Titanium.Network.createHTTPClient(); xhr.onerror = function(e) { swim.lib.err('' + e.error); alert('HTTP ERR...'); }; xhr.onload = function(e) { ...

JSON Alert view of data

I'm trying to view my json file to make sur eit's under the right path and to make it into a table. This is my current code i.API.info('===> assets(resources) dir: ' + Ti.Filesystem.resourcesDirectory); var fileHandle =...

How to Show Json object Data in TableView

hi i am builting an app which will get user information from backend in json format, so i want to display the json object values in table view. following json repsonce im geting from the backend { "action" : "get", ...

JSON parsing problem

How is it possible that this code absolutely works (i.e.: JSON parsing is done without problems): ~~~ var f = Ti.Filesystem.getFile(Titanium.Filesystem.resourcesDirectory,'/lib/data.json'); var content=f.read(); ...

Where should I store a .json file?

I've got a json file (xxx.json) I want to access as some kind of local database. I will update its content whenever I release a new app version. I'm using Alloy (iOS) and I cannot find a location for it! Ti.Filesystem.applicationDataDirectory or...

Length of Null

The file downloads. The file gets read. The json gets parsed. The json length gets reported. The json becomes null. The app in question, downloads, saves then reads a text file, then parses the text file, then for loops a table view of the data. It does...

Unable to view result

Hi I have a php file which returns JSON data. I am unable to view the data in my app. The following is my code ~~~ var window = Ti.UI.currentWindow; var xhr = Titanium.Network.createHTTPClient({ onload: function() { var gpn =...

Rest and parse json

I want to parse a response for a rest services, I follow this tutorial http://learnappcelerator.blogspot.com/2013/08/alloy-rest-api-json-to-tableview.html but json value is undefined Is there any other example that i can follow to use rest and parse the...

Unexpected end of input

This makes no sense to me. I've got a PHP script that is creating a json encode of a mysql request and passing it to my app. It works the first time, when it generates a text file of the json string, and then it ceases to work until I delete the...

Unable to parse JSON string

Hello. The below code is causing an error, and I am not sure why. I created the string by calling JSON.stringify. The log passes validation on all JSON validators that I have used. I am passing in...

How to display JSON in TableView

I've spent the whole afternoon looking to documentation, also googling and reading some questions on this forum without success. I've found only old answers that doesn't work anymore. I simply would like to know which is the best practice/method to display...

Cant Post JSON To Web Service

Hi, I have been reading through the Q+A of other members trying there solutions but none of them are working for me. I have a button event when clicked i wish to get the values from the text fields on the mobile client and post them to the web service url...

How do you delete a custom object in ACS?

I'm looking for a way to delete a custom object in ACS, either via code or the web dashboard. For example, I create objects pinto and beetle that are cars, then delete pinto and beetle objects, the container object cars still remains as cars(0) in the...

JSON file to model

Hello, I am reading a json file in my app, and populating a listView. In the back-end I have a mySql server, and my json file is generated by a php function that retrieves data from the DB. I also have a PHP function in the back-end that deletes a single...

Appcelerator json read problem

Hello to everyone, I have a serious problem. I tried add data in tableview. I can get values from HttpClient but I can't add data in tableview. How can i do that. My codes as follow. var win = Ti.UI.createWindow({ backgroundColor:'white' }); var...

JSON Problem

I Can Read From web Service With JSON It 's read data successfully when i display it at tableview it displayed and when return display it the data disappear

Showing 1-50 of 955 1 2 3 4 5 620