document.addEventListener("backbutton", onBackKeyDown, false);
function onBackKeyDown() {
if(!($.mobile.activePage.attr('dsid') == 'login')){
alert('');
}
}
how can I avoid the
Hi!
Can you clearify, please?
What exactly do you want to avoid?
I would like to avoid the usage of the left button on the image above to be used on all pages except the login
Does the code you've posted work or message alert('') is shown?
Hello! Try to use the following JS:
codedocument.addEventListener("deviceready", function() {
document.addEventListener("backbutton", onBackKeyDown, false);
});
function onBackKeyDown() {
if(!($.mobile.activePage.attr('dsid') == 'login')){
alert('not login page');
} else {
navigator.app.exitApp();
}
}/code
hello -
Where will this JS go?
Is this on page load?
Hi Kieran,
No, in custom JavaScript.