Open another .js on image click event

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

Hey, I want to know if I can open another .js like form table views, but just from the event of clicking on an image. I suspect I have to include the file, but where form then on?

Thanks!

iOS, Studio, 2.0.0.GA

1 Answer

Accepted Answer

You simply have to create a new window by passing the .js file as the url property

image.addEventListener('click', function(e) {
    var win = Titanium.UI.createWindow({
        url: 'other_file.js',
    });
 
    win.open();
});

Your Answer

Think you can help? Login to answer this question!