I have the following code:
var c = null;
c = Titanium.Network.createHTTPClient();
var url = 'example.com';
c.open('GET', url);
Titanium.API.log('info', url);
c.onload = function()
{
Titanium.API.log('info', 'onload');
setInterval(getPeople(), 5000);
};
c.send();
The code should access the getPeople() function every 5 seconds, but it does not. In fact, the application exists prematurely.
what Im I doing wrong?
Try either:
or: