Community Questions & Answers
show data from on emulator from database
hi everybody i want to show extract data from my sqlite database and show it in a list view but my code didn't work ~~~ var win = Ti.UI.createWindow( { layout:'vertical' }); //invoke a web service // create...
Loop through a Json File ?!
Hey Guys, i have tried several things, but i just can't get it work... I wanna loop through my json data with a recursiv function. I've uploaded an example to my webserver. Help would be so much awesome. my mind is totally fucked by that stuff...
invoke json web service in titanium
Hello everybody i'am new in titanium developping and the web service my problem is that i need to invoke json webservice when i clicked button in my titanum android applicatio but i don't know how and where i should make the code of invoking web...
Show data in list view
Hi Everyone iwant to know how to load data from the server and show those data in a listview ? thanks
HTML parser
Hello, I would like parse html result but I don't know exactly how. I make this code : ` htmlparser.js exports = {}; htmlparser = exports; soupselect.js var domUtils = require("include/lib/htmlparser").DomUtils; var domUtils =...
JSON Arrays within an Array
I'm fetching data from a server. The output is in JSON, but one of it has Arrays within an Array. Example Output: ~~~ "infos":[ [ { "title":"title 1", ...
json
i'm trying to select from remote database and set data to tableview but there is nothing returned i don't know why just because i don't know anything in php and i don't have enough experience in titanium so please anyone help me there is my code...
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 with large amount of remote JSON data
Hello, i'm downloading a large amount of data (6MB) with httpClient. I use JSON.parse(this.responseText) to use the data and save then in sqlite. In some devices (tablet samsung galaxy note, samsung galaxy ace) the first time the data is downloaded it...
Titanium HTTPClient Authentication Help
Yes, I am having trouble connecting to a webservice via titanium. Here is my code JUST FYI, I have not disclosed the URL or credentials as they belong to a client and need to remain that way ~~~ var xhr = Titanium.Network.createHTTPClient(); xhr.onload =...
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...
Titanium error after BSOD
I've recently encountered an error message with Titanium and I have absoulutely no idea how to resolve it! It happened when one day my laptop ran out of battery with Titanium running. Upon restoring power to it after plugging in the power cable, I...
JSON.parse cannot return length (==undefined)
Hi, I've searched for this problem a bit now and cannot figure out why it doesnt work. Running the latest SDK (1.8) with iPhone 5.0. Im creating a JSON-object from the server with php and json_encode. Here's the json-data which is returned in my...
callback function... help me please!!!
i've a array with elements content one url of the json data: ~~~ jsonData['programas'] = 'https://eurekalab.com.mx/apps/radiocongreso/index.php?option=com_obrss&task=feed&id=2'; ~~~ and i've a function to read this array and save in file for each...
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,...
don't want to assign JSON data to table
All the examples I have found return JSON retrieved data to a table ... I don't want to do that I want to return the data to various labels around the screen... my json data ~~~ { "Stats": [ { "Stat":...
Where/How to add eventListener
I am building a Titanium mobile app for iOS. I have a search field where the user input is passed to the remote server. A php file queries the database and returns the resultset as JSON that I place in a table. My php file works as intended and the code on...
httpClient into httpClient
Hello I can create one within another HttpClient httpclient? show my code ~~~ enviar.addEventListener('click',function() { var url = "http://localhost"; var client =...
Can't scroll to last row in tableview when generated from remote json.
I'm grabbing a remote json file and using it to build a simple table view. Each row contains a thumbnail image and a short line of text. There are about 25 rows, and when I scroll down, I can't scroll past the second to last row. If I switch tabs and...
Parse error
Hello, I've this error. A need to parse a string to get a JSON object to send throught HTTPClient: ~~~ var xhr = Titanium.Network.createHTTPClient({ onload : function() { <something> }, onerror : function(e)...
Why sending nested JSON to a Rails app doesn't work?
~~~ xhr.send({ person: { name: n, surname: s } }); ~~~ This doesn't work. Rails app receives params malformed and can't parse it. ~~~ xhr.send( { name: n, surname: s } ); ~~~ This works. I'd really like to use the first option (with nested attributes)...
Multple annotation Problem
Hi, Here is my code, i m developping an application that detect the restaurant near you, this is working fine, but the problem is that i can only detect one annotation in map, i want a multiple annotations showing on map ~~~ win1 =...
Dynamic annotation json problem
Here is my code, first it tells me that annotations is not defined and when i delete this line, application is closed. here is my code: ~~~ Titanium.Geolocation.distanceFilter = 10; var win1 = Titanium.UI.createWindow({ title:'Window', ...
HTTPClient Timeout Not Working
Timeout not working in iOS. Here my code ~~~ var xhr = Ti.Network.createHTTPClient(); xhr.setTimeout(1000 * 60); xhr.onload = function(e) { Alloy.Globals.searchResult = JSON.parse(this.responseText); renderResults(); }; xhr.onerror =...
Webview + javascript
Hi, Here is my code, i created an hmtl page with a function inside and want to call it via javascript:here is my html page called index.html: ~~~ <html> <head> <title>...
json 2 problem
Here is my code it's not working it show me the button but when i click on it nothing is happening, here is my code: ~~~ var win = Titanium.UI.createWindow({ backgroundColor:'#fff', title:'Window' }); var button =...
Problem with DataBase
Hi, Here is my code, i created 2 textfield, one for name et other for password, i want when i click to button, the name and password goes to database ~~~ var win = Titanium.UI.createWindow ({ backgroundColor:'#fff', title:'Database ' }); var name...
Custom Object Array converting to String
In My Apps on Appcelerator portal of ACS, I created a Custom Object, with properties, the value of the property is something like: `[ { 'name': 'somename', 'perc': 60 }, { 'name': 'othername', 'perc': 35 } ]` When I save the object, it converts the JSON...
Cannot read property "length" from null (android)
This is the runtime error that shows my app in some devices (or sometimes) when I try to do a loop in a json data. I only use jsonObject.item.length to know the number of items.
How to parse / search json string from server...
I need help trying to figure out how to parse / search a JSON string that I get from my server. The returned JSON is as follows: [{"user_id":22,"login":"1234"}] It actually returns around 40 more things, but I only care...
Try to create pins based on JSON data
Hi, My question is, It is possible to create a searchbar to write an address, and when tap a button, an annotation is placed on a map? Thanks
Titanium.Network.createHTTPClient() + POST + JSON send empty post on Android
Hi, my first mind breaker on this forum: here is my code ~~~ var cupload = Titanium.Network.createHTTPClient(); cupload.setTimeout(timeOut); var queryHttp = utils.formatString("%s%s/%s", profile.datafeeder_prefix, 'sync_orders',...
How to load(lazy loading) div in webview ,whenever that div is visible
Hi guys, how can we achieve a lazy loading of div's according to scroll position in webview for android 4.0.3 device. **using** 1. Ti sdk: 3.0.0 GA 2. Platform & version:android 4.0.3 3.Host os: windows7
How to Increase the speed of the app within?
Currently my code is running perfectly, except for the fact that it is very slow. Can I know how or what can I do in order to increase the speed of the app? Also my home button is slowest of them all, please help me. ~~~ var url = "working...
Fetch a specific array information in .JSON in Titanium Mobile SDK?
How to fetch the information of one array only instead of all from json url in Titanium Mobile SDK? Here is my code in app.js ~~~ var url = "http://dashberry.com/mspikes/json/mainmenu.json"; var table = Ti.UI.createTableView(); var tableData =...
Problem to sort a JSON with a specific value
Hi everyone, I am having a big trouble with some data to sort a JSON object with all the nodes whose got the value that I want. I am retrieving my complete JSON , no problem for that. But when I am trying to sort it to get a smaller one with a function. I...
How to call method using WCF Service ?
Hi all, I am trying to call WCF Service in my project. Just i want to call GetAddition Method and GetImage Method. Please someone help to me. Below is the code ~~~ var win = Titanium.UI.createWindow(); win.backgroundColor = '#ffffff'; var xhr =...
Error on ajax.
well i am want to show record of remote data base in table view and i am facing error on `ajax.get(url, params, ajax_cache_domain, cache_for, function (response)` here is the code. ~~~ var search = Titanium.UI.createSearchBar({ barColor:'#000',...
Accessing data in a nested JSON response
Im trying to access data that appears to be an object in an webservice call. The structure of the returned data has me stumped on how to actually pull the values out. Any help would be appreciated. The response information is formatted as such ~~~ {} JSON ...
How to delete TableViewRow & refresh window dynamically
Hi, I have created global array which maintains a detail of products its( id & quantity ). The entire structure is displayed in the form of tableview. for eg If I remove an entry of product from tableviewrow, then how to refresh the same window such...
Displaying json inside webView problem
Hi, I'm developing for ios and andorid using sdk 3.0.2. In my apps I've created a data base and stored there some html that i receive from a json web service. ~~~ var db = Ti.Database.open('embloiticDb'); db.execute('PRAGMA encoding =...
Alloy model to get JSON from web service and display it in TableView
Hi, I am new to Alloy and am looking for a working example in which I will get getting a response from a web service and populate it in a tableview. I am trying to achieve this using Alloy. I am looking for an example on how to implement this feature....
Search bar Not Working for remote data base
i want to search record of remote database through search bar but i am facing problems. hear is the code of some one and i modified it for my self. ~~~ /SEARCH BAR var search = Titanium.UI.createSearchBar({ barColor:'#77B121', height:43, ...
Alloy Model Sync and Persist Data form JSON
I'm using restapi.js to fetch a json feed to an alloy collection. I can fetch the collection, but can't save it to the persistant stored on the device? If I call .save() on the model object i get this error. Basically I just want to call to a web...
passing parameters
In my application, i have a login screen. After the user logs in he gets a list of agenda. He selects the agenda through check box. I want to send the username with the respective checkbox to the back end database. The back end database is in .php file. I...
Searchbar with Remote database columns
Need help to get my remote database record to work with my searchbar to find the names in the rows.
Using Alloy and pulling data from a remote REST API (JSON)?
I've been away from Titanium for about 6 months and have just started working on a fairly simple little app, that pulls a list of items from our existing json api with basic authentication. I've been trying to look through the docs, but really cant fathom...
JSON Parse
var xhr = Titanium.Network.createHTTPClient(); xhr.onload = function() { var data = JSON.parse(this.responseText); Ti.API.info(data); var itemList = data.list; var x = 0; for(var i in itemList) { var thisItem =...
Parsing JSON string from module event
Hello, I am using Titanium SDK 3.0.2.GA and Android 4.0.3 and am having an issue parsing a JSON string that is being passed from a module. If I test parting within titanium, it works perfectly fine with the example below: ~~~ var sampleJSON =...
undefined const only in iOS
Hi there : I got some error while running under iOS simulator; here is my code : Ti.App.WS = {}; Ti.App.WS.Code = {}; Ti.App.WS.Code.Succeeded = 0; And the error is on Ti.App.WS.Code.Succeeded = 0; line saying that : " undefined is not an object :...