Community Questions & Answers
Trouble accessing elements of a XML doc.
Hi people: I need some help because I don't know how to manage this XML document. This is the response from one webservice, I need to show some of its elements into a window but... This is the structure of my...
Facebook Appcelerator and Parse integration need help
Trying to create a user and link the user to Facebook directly from Parse. more details are posted here including [source code can be found here](bit.ly/ZIzybH)
Parse and xml to an array
Hey people! I need some help. I must parse an online XML document and put the elements of each item in an array. I'm trying to do it but when i do `data.length();` it is 0. ~~~ function parsear() { var data = []; var xhr =...
Load Content inside a div from a website into another div in the app
Hey I was wondering how i can use a more naitive method of getting content that is in a div on another site. I currently can do it with jquery ~~~ $(".content").load("http://sample.co.za/about/about/ .entry-content"); ~~~ This is...
webview does not open image
Hi! I'm trying to open the image in the WebView, but for some reason it does not want to open, at the time, as well bruzere opens in iOS (Safari) and Mac (Chrome). In what may be the problem. PS: Other images are opened without problems. The fact that I'm...
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...
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 ...
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 =...
Parse parameters addEventListener
Hi guys, I've made a for loop for creating 8 tumbnail images for video's. `edn.ui.createSmallImageTumbnail` is a selfmade function for creating the tumbnails, the first Ti.API.info returns the idWithParseShizzle, but in the clickedTumb function it won't...
XML parse string error for iOS
I am working on caching the xml files to make my app accessible offline. On the homepage of my app, I called all the xml files that my app uses. And this is how I am parsing my xml file. But it's giving me error. Here is my code: ~~~ var data =...
Multilevel JSON parsing IOS
Hi I have a multilevel JSON with different info but I can read nothing.. This is de JSON ~~~ { "action_number": 200, "action_status": "OK", "action_message": "", "results": { ...
Inserting into PARSE from Alloy
Im using parse for the database in my project and Im having no problem connecting to it and I can delete records by id but im having a tough time selecting and inserting records. Im using the createObject call to insert the records ~~~ ...
Ti.parse.js with facebook
someone managed to integrate ti.parse.js in titanium with facebook support? i saw the guideline [here](https://parse.com/docs/js_guide#fbusers-setup), but i didn't find the right way, cause they are using parse.js in web applications, not in Ti solution.
Retrieving an image from parse.com and assigning it to a variable
Hi There, I've got a problem at the moment where I call a query and retrieve three specific fields from the parse.com datastore. Two are simple text attributes, but the other is a file (image). When I call the get function... 'var photo =...
If a JSON node doesn't exist all the time.
Hi, I am trying to pull in some opening hours information from a JSON feed for an iPhone app. The issue I am having is that the opening and closing hours for Sunday are not always available. Example of the JSON code of the feed below. When Sunday is...
parse wordpress problem
hi, I have problems parsing a json file. this is my code, can't see what Im doing wrong... ~~~ var win = Titanium.UI.currentWindow; // Function loadTweets() function loadNews() { var url =...
Own personal Social network
Hi I want to build a cloud-based personal social network that is used in my app only. What is the easiest and best solution? I found a few but not sure about them. 1. Stackmob - https://www.stackmob.com/ 2. Parse - https://www.parse.com/ 3. Appcelerator...
httpClient does not want to show results
so i have written this bit of code and basically i just want it to pull the username from FB and post in on my profile page Ti.Facebook.requestWithGraphPath('me?fields=name,picture', {}, 'GET', function(e) { if (e.success) { var response =...
How to parse JSON number?
Hi I want to youtube video in my app using JSON but I don't how to parse number.(It is weird) This JSON contains video but movie is number like this ~~~ content": { "5":...
Parse error with a string and slash
Hi, I want to check if a substring is in a string. I use : var imgr2 = "data\images\" But I get a parse error. And to "fix" this string ? Regards
JSON parse very wird
I have a problem with a JSON Object ~~~ { "response":{ "date_ts":1352431749, "raw":{ "profile":"realtime", "battery":-100, ...
Parse.com library - Querying with where parameters
I tried modifying the parse.js provided by appcelerator for querying parse.com's rest api. I'm getting some issues with the query not really working as expected. Anybody who were able to create a functioning parse...
Parse.com REST API, keys and security
Hi all, I'm new to the Cloud and all what it means. I'm planning on connecting to the Parse REST API from an app i'm currently working on. I have tried out this approach: [parse tutorial on...
Rest API for android push notifications?
Hello All, I am building a very simple app using parse for notifications. My question is how would you use the REST api to register a android device for push notifications. I have provided some links below of stuff I've read but most of it is general REST...
Parse error on device. Works fine in emulator.
I'm getting a parse error on device on the same line no matter what I do. Cleared build/iphone; unistalled completely from itunes; used two different ipods; added extra lines of code; ran through js validator... nothing helps. [There is a similar issue...
Looking for RSS thumbnail parsing suggestion
Having spent more than a few hours searching through both this forum and others, I still haven't found a reliable approach to extracting thumbnail images from RSS feeds. While the RSS 2.0 spec indicates that image references should go in optional...
Push notifications with Parse.com
Good morning. I urgently need to develop iOS push notifications with Appcelerator and Parse.com. The module in the Market does not work. The author knows this and is fixing it. I have read that you can use to push Parse without any external...
Parse iOS Module fails
Hello. I'm trying the Parse iOS Module from the market. The author sais that we have to use the 3 prerelease version I'm doing that. But when I compile.... [ERROR] clang: error: linker command failed with exit code 1 (use -v to see invocation) [ERROR]...
Send JSON and parse in PHP
Hi ! I'm searching for days now and i can't find the mistake, i send my json : ~~~ var xhr = Ti.Network.createHTTPClient(); xhr.open("POST", "http://****.php"); xhr.setRequestHeader('Content-Type', 'application/json;...
datejs parse errors on iPhone since 1.1.0
I have been using the [datejs](http://www.datejs.com/) library in my app since 0.8. As of 1.1.0 I have been getting a lot of failures in the Date.parse() function. Parsing times with AM or PM (eg. '8:11 AM') specified will always fail and return null....
Parsing HTML without YQL
Hi, I am trying to parse the HTML output retrieved by a web page, but after I get the responseText string containing the HTML source I could find a way to call the DOM methods to parse the page. Trying to use responseXML doesn't work because it's a HTML...
Parse HTML Files
Hello Everyone, I'm trying to parse HTML files but unfortunately "Titanium.XML.parseString()" doesn't work with HTML files, I have to convert the HTML file to a DOMDocument. I saw this but I still can't figure it out...
Trying to retrieve and parse info from a .json link
I have a .json link with various information that I'm trying to retrieve in app. My code is as follows: ~~~ function loadInfo() { // Empty array "rowData" for our tableview var info = []; // Create our HTTP...
Parse .plist file
Instead of having a .xml or a .json file, i have to read and parse a .plist file. I need to parse this .plist because i am using this one from another project. I tried to use the same way as i did for xml but it did not work. Is there a solution to my...
JSON.parse rises an exception if the Json string is not valid. Any way to capture the error?
I noticed that if the json string passed to ~~~ var json = JSON.parse(this.responseText) ~~~ is not valid.. it will break the current block of code rising an exception.. What I want in this case is to protect the code from rising the exception and just...
How to parse Text
Good morning community, my problem is that i can't parse my Text..following situation with an XML Snippet which is out of my control Here the XML Snippet : ~~~ <item> [129236] Description of the product </item> ~~~ Now i get the Line by...
Remove whitespace from beginning of rss feed tag
I am pulling a feed from a horrible source, but it is inevitable. Within the feed, all the tags have about 2 line breaks worth of white space. What is a good function to remove this whitespace? Example: ~~~ <title> Swenson's Blog:...
Advanced text parsing with dates
Any help gratefully received on this... I have 2 externally sourced text variables that i need to parse and put into an array i assume. One contains the date ranges and the other the opening times for a tourist attraction... i) 01/05/2011 – 30/04/2012...
How to restore rows completely?
Hello all, I'm struggling in using Json for storing and restoring rows on tableview. When I finish application and reopen it, rows seem to exist but titles, views and label on rows which I leave out here do not appear. Why does this happen? Storing...
Parse IOS Module problem with dates
anyone is using parse ios module from marketplace? I'm having lots of troubles integrating this module with last titanium sdk (2.0.1.GA2). i bought the pay module from marketplace and downloaded version 2.0.2 that works, but i cannot find a way to make a...
Get facebook data by facebook graph
So, I'm building an app to android and I need to get some data from the facebook's user. The problem that I'm having is that I need to use an access token to access it and I have no idea how to preform a parse of that. When I only needed the public info, I...
Parse XML data
My xml export: ~~~ <?xml version="1.0" encoding="utf-8"?> <root> <menu> <lastUpdate>1320159661</lastUpdate> <tel>+12345678990</tel> </menu> </root> ~~~ code: ~~~ xhr.onload...
Display all values from XML request?
I'm trying to figure out the proper way to loop through a series of nodes in an XML response and display them all in separate rows in a tableView (in descending order). I've made it as far as being able to pull one value based on the index or all values as...
Parse large XML file or parse a specific node from it
Greetings, here is my environment: Application type: mobile Titanium SDK: 2.0.1 Platform & version: Android 2.2, Windows 7, Device: Android emulator Host Operating System: Windows 7 Titanium Studio: 2.0.1 My question: I am downloading an xml file...
pdf as Binary Data !?
Hi, Is it possible to read a binary data (pdf) from server and parse/ read themdisplay as pdf in a webview ? If this can be achieved pls help me out with sample.
Catch a parse error
Anyone knows how to catch a parse error from this.responseXML ? Sometimes when fetching a xml input, it times out. Timeout message can appear inside the xml data and the parsing will bail out. I want to make attempts to fetch new data if the xml parsing...
parsing date time string?
I'm attempting to parse a mysql datetime field output. So far my method below works, I think, in getting it into the JS date object, however when I attempt to use some of the Data data object methods it does not always return what is expected. ~~~ dates =...
Parse json text
Hello I need help , in response I am getting JSON text , how can I parse to find out coordinates": [ -118.0273914, 33.9548846, 0 ] , i want to retrieve coordinate values Below is JSON ~~~ { "name": "90605", ...
disable json.parse sort
Is there a way to disable the standard sorting in a json.parse ? i put in a object with {[1]{item:sad,item2:asda},[2]{item:sdasdw,item2:123a}) and so on.. and it gives them back in an order not logically.. like i have 1 2 3 4 5 inserted i get 3 2 4 5 1...
parsing json and showing image in coverflowView
hi, I want to parse json and show images in coverflowView..following is my...