I have a button, on click an alert appears and a new win will open.
button1.addEventListener('click', function(){ var win1 = Ti.UI.createWindow({ url:'some.js', }) { alert("Hello! You will only se me once :)"); }; win1.open(); });Is it possible to display this alert only once (it will never appear again)?
1 Answer
Accepted Answer
you can use boolean property to set this like
Ti.App.appear = true; Ti.App.appear = false; button1.addEventListener('click', function(){ var win1 = Ti.UI.createWindow({ url:'some.js', }); if(Ti.App.appear == false){ alert("Hello! You will only se me once :)"); Ti.App.appear = true; } win1.open(); });
Your Answer
Think you can help? Login to answer this question!