eventListener only works one time

You must Login before you can answer or comment on any questions.

I have a window with three buttons and three eventListeners. If one button is clicked, a new window is opened. When the keypad back button is clicked the original window appears, but none of the button events will work. I can see that this was an issue some months ago, but I cannot see where there has been a fix, and I cannot find a work around. This is my code:

btnAuth.addEventListener('click', function(e) 
{
            var newWindow = Titanium.UI.createWindow({ url: 'winTV.js' }); 
            newWindow.open(newWindow,{animated:true}); 
});

2 Answers

Why are you opening window that way? Where have you seen that?

Anyway, you have provided only minimum of code that isn't very relevant, so I doubt anyone can help you.

This happened to me because I defined the button and the listener inside a function - outside it worked well.

Your Answer

Think you can help? Login to answer this question!