I have a Problem with my Splashscreen....
It navigates avert 4.2 seconds to the Home Page. But wehn I press back it will be go back to the Splashscreen and loads endless. How can i disable the Back Button (Hardware) only for the Home site?
I have a Problem with my Splashscreen....
It navigates avert 4.2 seconds to the Home Page. But wehn I press back it will be go back to the Splashscreen and loads endless. How can i disable the Back Button (Hardware) only for the Home site?
Hi Anton,
You cannot disable Back button on device, but it's possible to add any action on "Backbutton" event.
Anton.
I drop my splash screen then app cant go back.
Example
code
setTimeout(function() {Tiggzi('Splash').detach();Tiggzi.navigateTo('Menu',{ transition: "none"});},4000);
/code
Assuming you splash screen is named "splash" and the screen togoto is "Menu"
Change to suit.
AND/OR
Add this code on Device Ready
code
document.addEventListener("backbutton", mybackHandler, false);
/code
Now in custom JS add this
code
function mybackHandler() {
if ($.mobile.activePage.attr('dsid') == 'Menu'){
alert('Dont Use The BACK Button ! Click Exit Button To Exit...');
}else{
//navigator.app.backHistory();
history.back();
return;
}
}
/code