Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8332809
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T02:49:41+00:00 2026-06-09T02:49:41+00:00

I am working with phonegap and jquery mobile but am having problems with going

  • 0

I am working with phonegap and jquery mobile but am having problems with going back on pages. There are four pages:

Splash

Login

Main

SubMain

So Lets say the flow goes like this always hit the splash screen first. If a user has never logged before, they are shown the login screen, if they have then they are shown the main page. Here’s a scenario:

A new user will navigate like this:

Splash

Login

Main

SubMain

Now from Submain screen, if they want to exit they will hit the back button until the they exit. However this route will take them through the Login page and the Splash screen again, when I want them to exit the app when they hit back on the main screen.

Is there anyway to make the user exit when pressing back on Main?

I realize I could avoid this by disabling the back button and adding an exit button.

I’m not sure if this matters or not, but all my pages are in one single html file separated by divs with the data-role="page" attribute

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T02:49:43+00:00Added an answer on June 9, 2026 at 2:49 am

    I think navigator.app.exitApp() is what you’re looking for. As we keep track of the history manually our helper function looks similar to this:

    function backKeyDown(){
        if(historyContainsInfo(){
            popHistory();
        }else{
            navigator.app.exitApp();
        }
    }
    

    and is registered via document.addEventListener("backbutton", backKeyDown, true);

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working on my first PhoneGap app with JQuery Mobile and I've having a
So here's my problem. I'm currently working on a PhoneGap application using jQuery Mobile
Created a phonegap application using jQuery Mobile. Everything is working great for the most
I'm working on a mobile phone app using jQuery mobile and phonegap. I'm using
I'm working on a mobile app using Phonegap (1.4.1) / JS (jQuery Mobile 1.0)
Working on a mobile application using jquery mobile and phonegap framework. My question is
I am working on a PhoneGap application using jQuery Mobile. Currently I am only
I'm currently working on a PhoneGap application that uses jQuery, jQuery mobile and a
I have a working HelloWorld phonegap program with jquery mobile sprinkled in as described
I have phonegap and jquery mobile working properly and am trying to add codeigniter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.