Community Questions & Answers

array parsing

hi I have problem in my project .Actually parsing the data from two url's. first i'm getting the data from business partner table and i'm getting id's and with that id's and calling the data from aduser table ~~~ var getnamearray = [ ]; var...

Problem with returning an array

Hi, I declared an array, then I put data inside and when I make an alerte I see the data I pushed. But when I return the array, it is empty, can someone tell me why ? ~~~ function createAnnotations() { var annoatationData = [];//<----- declaring my...

Variable By Reference

Hello, I'm trying to figure out how to access a variable by reference in Titanium. I've created an array of views, and I want to swap between them at will. I add say view_array[1] to my window, make changes, and then swap to view_array[2]. When I try...

remove particular item from array

Hi - I have an array of objects.... for example ~~~ var myarray = new array(); myarray.push({id:4,name:'matt'}); myarray.push({id:7,name:'matt'}); myarray.push({id:22,name:'matt'}); ~~~ I know the "id", for example "4". How do I...

Alloy.Globals.* array??

I want to use arrays as global variables and read them from .tss file, but Titanium gives me errors when I declared/used like this: alloy.js ~~~ var array = []; array[0] = 64; array[1] = 96; Alloy.Globals.array = array; ~~~ index.tss **(gives me error...

Alloy custom table row

Hi All I am trying to populate a tableview with a simple array of names. The table view has a custom view with a label in it. I am trying to this Alloy, all the examples I have is titanium online. Could anyone please tell me how to pass a simple array...

Skip Button for iPhone

I have a few statements in an array and I'd like to cycle through them with a skip button. I've added an event listener to the button but it only seems to effect the button and not my statements. Here's the code example: ~~~ //Label for Statement var...

Image not showing up on Android build

I am simply trying to get an image to show up and I am having no luck. The app I am working on has lots of other images that show up, but for whatever reason these images don't show. Here is my code to run through the loop I am using for my images. The...

Looping array items

I have a code like this. ~~~ for (var i = 0; i < 2 i ++){ var userAlert = Titanium.UI.createAlertDialog({ title : 'Alert', message : 'Would you like to go in position ' + i + '?', buttonNames : ['YES',...

Parsing XML

Hello, i have some trouble with parsing a xml document. I Need the following information: the 'id' value and the 'data' value for each item block to put the information in a tableview. I took a look at different examples but in this case, i think i need 2...

More efficient array

Hi i copied this code from an example but would it be better to place the data directly inside the array? I just don't think i need the data detached in this way. Thanks, examples most welcome. ~~~ var images = []; images['home'] =...

Sorting an array alphabetically

Hi, I've gt an array that I want to sort in alphabetical order. Here is how my array looks like. var arrType = [ [ {bookType, bookName}, {bookType, bookName}, {bookType, bookName} ], [ {bookType, bookName}, {bookType,...

How to onsert rows into a MYSQL table

I am trying to create an array to insert multiple rows into a MySql table. I have the for but I am not familiar how to create an array. I need some help . here is the form. <html> <head> <link rel="stylesheet"...

Give unique id to variable

I am trying to give a unique id to a variable every time an image view is clicked on. I then want to take that same id and reference it to play a certain video based on the id for the array I am giving. Here is my code. I am having no luck getting the...

tidy array output

Hi, My code to get the array to begin with: ~~~ var mes = []; if(errors.length > 0) { for (var i = 0; i < errors.length; i++) { Ti.API.info(errors[i].message); mes[i]=errors[i].message; ...

XML not displaying correctly (android)

Greetings, I'm trying to read a local XML file and display the content so that when you click on a heading, the sub items show. Click it again and they hide. This would be very easy to do with html divs, but I can't seem to get it working in...

Showing 1-50 of 278 1 2 3 4 5 6