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...

Javascript - Garbage Collection

I'm a bit confused here: 1. Global variable will stay in memory even if it will not be used anymore? For example, in app.js: ~~~ var foo = Ti.UI.createView(); //something else. the foo will never be used again. ~~~ So the variable foo and the view it...

Array objects

var users = [{id: 1, price: 50}, {id: 2, price: 20}]; var comments = [{id: 1, comment:'"test"}, {id: 3, comment:'check'}]; how can compare these array using id,,,i need to find out id not in comments array i am new in java script ,,plez help

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 =...

Showing 1-50 of 906 1 2 3 4 5 619