Community Questions & Answers

Trouble pathing in require method

Hi people! I had trouble linking the js file into the require method. It gives 'Uncaught Error: Requested module not found' error. I also tried cleaning the project and it didn't work. It would be great if you can guide me along! Many thanks! :) Here...

Variable in AddEventListener

Hi guys, I got a quick and newbie question on variables in javascript I was wondering is it possible to get the updated value in a whenever I scroll the scrollView? Many thanks! Code example: ~~~ var a =...

Javascript: which is the utility behind prototype?

Hi, I've some doubts about prototype function in Javascript and its benefit also because of the books I read that make simple and silly examples about its usage. What is the utility to write in this way: ~~~ function Person(firstName,lastName) { ...

TableView data not showing

Hi, I have some code which is supposed to show 2 rows of data with an image and 2 labels but when I run the code the text and images don't show up. Here's the code: ~~~ var tableData = []; dataArray=[{title:'Watch Dogs',...

How can I get the parent objct of another object?

Hi, how it is possible to point to the parent object from its child object? For example, I have a button inside a window: ~~~ var winStart = Ti.UI.createWindow({ ... some properties... }); var btnStart = Ti.UI.createButton({ ... some...

emulating HTML form?

I'm developing an App that connects with an external API and I need to add an document upload function. The API is expecting the format of this upload to be like it's from an HTML file form field. Basically they're expecting the equivalent of...

Program Flow -- Order of Execution

This may seem like a very simple question to the experts out there, and while I am by no means an newbie developer, I am having trouble coming to grips with the order of execution of Titanium javascript apps. Code snippet to illustrate my...

App won't read php file

Hello, I am having an issue with an application I'm working on. Currently in my index.html file I have a simple jscript function that has the future goal of posting an input string from a user to a php file which then interprets this and grabs data from my...

Running remote JS code

I have a PHP file which returns some JS code like ~~~ var someVar= <script type="javascript"> some script..... </script><noscript> ...... </noscript>; document.write(someVar); ~~~ which I have been able to get from a...

variable null outside function

Hello, I'm very new to titanium and javascript so please excuse me if my question is a simple one. I have the following lines, can someone please help me understand why console.log(arr); gives me a null value. ~~~ sendit.onload = function() { json1 =...

Change color of tab icon

I am building an iOS 7 app using SDK 3.22 and Studio 3.2 on a MAC running OS 10.9 testing on a device. I want to change the default gray tab icon color to white. I have figured out how to change color when it is active but not inactive. Here is my...

Event Listeners for multiple objects in a row

I am building a Titanium iOS app using SDK 3.2.2, Studio 3.2, OS 10.9. I have a tableview that has two images and some other labels on each row. I want to be able to click on each one of the images and swap for other images and I want to be able to click...

Showing 1-50 of 899 1 2 3 4 5 618