Question

I tried

btn.click();

And the error message is 'Cannot call property click in object ti.modules.titanium.ui.ButtonProxy@44f61. It is not a function, it is "object"'

Was it helpful?

Solution

btn.fireEvent('click');

this should work

OTHER TIPS

btn.addEventListener('click',function() {
    Titanium.API.info('Button Clicked');

});
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top