Hi all,
I have the below code for favorites fuction. My goal is how to: update the button with other image and other alert msg if is already added.
fav_btn.addEventListener('click', function (e) { var db1 = Titanium.Database.install('database.sqlite','database.sqlite'); db1.execute('INSERT INTO favourites (entry_name) VALUES(?)',c_name); var alertDialog = Titanium.UI.createAlertDialog({ title: 'Test App', message: 'Entry is added to favorites.', buttonNames: ['OK'] }); alertDialog.show(); db1.close(); });