Community Questions & Answers

PUSHing to a REST API

So I am able to use GET commands to get information from a RESTful API no problem. However, I can't find any clear examples or documentation on how to PUSH new data. Supposedly I can set up a JSON object and change the command in the httpclient from...

upload files

Hello I would like to help with this problem, which is to take all the pictures taken with my camera and send them to a server ..... I think I have a variable for each photo and deliver them client.send ({"image1" : imagen1.png, etc}) I have...

No HTTP response

I have a datastructure in a seperate JS file. In that datastructure there is a function that calls a HTTP request. This worked on android, but now on iPhone the `onerror` and `onload` dont get called. The console prints this ~~~ [WARN] Creating [object...

upload image tu server

Hello I need your help please. I'm trying to upload an image file to my server type from an application in android, using the latest Titanium SDK version. I have this code that modifies watching other questions of different users with similar cases that...

Populate a variable using an httpclient call

I am attempting to populate a variable in a module by calling remote data using the httpclient. I am doing so by calling a function as follows: ~~~ var currCity = getCurrCityName(); ~~~ And here is the function: ~~~ function getCurrCityName() { ...

Try/catch

I need to turn this into an if/else or try/ catch... I've tried both without success ... this is what I am trying to do .... if the app connects and transmits data then delete table in database, else if it does not connect and transmit then do nothing at...

xml parsing problem

~~~ Ti.UI.setBackgroundColor('#fff'); var win=Ti.UI.currentWindow; var url='url'; var xhr=Ti.Network.createHTTPClient(); xhr.onload=function(){ var xml=this.responseXML; Ti.API.info(this.responseText); }; xhr.onerror=function(){ alert('try...

httpclient onload not handling conditions

I am trying to get the httpclient to process some code based on the responseText value. This works: ~~~ var client = Titanium.Network.createHTTPClient(); client.onreadystatechange = function () { alert(this.responseText); } ...

regression error on httpclient

Several months ago, I learned how to use the http client in mobile iOS apps (primarily iPhone apps). Last week, I upgraded from Titanium mobile SDK 1.7.3 to 1.8.1 and now the code fails. Today, I boiled down the problem to the example below. It is a real...

get php parameters

Im trying to implement a GET request to a PHP file which is just echo the parameters that get. The app gets the value of a textArea and make a get request to my php file, the request is working properly but if im trying to send "error" form the...

Loading Remote Json data in the background

I have an app that has a number of tables contained in views. The table data is downloaded from Json files on my server and this is done as soon as the app loads by including the views as functions in my app.js, when the user opens a view the table is...

Map with Google Json

I hope this helps every one ~~~ var win = Ti.UI.createWindow({ title: 'Map Google' }); var address = Ti.UI.createTextField({ hintText: 'Your Address', top: 60, width: 400, left: 10 }); var ok = Ti.UI.createButton({ title: 'Show Map', top:...

Problem in posting JSON data

Hi Everyone, I want to post JSON data using HTTP request. I have read the official [docs](http://docs.appcelerator.com/titanium/latest/#!/guide/Handling_Remote_Data_with_HTTPClient_and_JSON) and I am working according to them. I am using the following...

httpclient (xhr) in .js

I need a httpclient in a. Js My problem is that it returns undefined. Any suggestions? called ~~~ //conexion.js conexion = function(datosClase){ var xhr = Titanium.Network.createHTTPClient({ onload: function(e) { return...

callback function... help!!!

hi i need help to solve this: i've a config.js with this: // array with elements content one url (json data) jsonData['programas'] = 'https://eurekalab.com.mx/apps/radiocongreso/index.php?option=com_obrss&task=feed&id=2'; and jsonLoad.js,...

Showing 1-50 of 766 1 2 3 4 5 616