How to navigate one page to another page in android phonegap?

I am new to PhoneGap.

My application has to 2 pages. The first is loading fine. First page contains one buttons, which when clicked should move to the second page. How to load the second page? Should I prepare one more activity extending DriodGap?

  • How to define and use a system property in Android Instrumentation test?
  • Admob native ads: Invalid NativeAdManager type. Found: qa; Required: NativeAdManager
  • How to get the proper bounds of a view after transformation Matrix
  • Find out if ListView is scrolled to the bottom?
  • Referencing a string in a string array resource with xml
  • Combine Xamarin and React Native in one app
  • I have one more problem: how to catch back button events?

    Related posts:

    How to check user entered own phone number in EditText?
    Use refresh token if auth token expired in account authenticator
    SQLite database limits in Android
    HTML5 <video> element on Android
    How to get all cookies from CookieManager android ?
    Why isn't onRestoreInstanceState called after onStart?
  • Android In-App Billing Dynamic Product List
  • Properly tracking install referrals on Play Store
  • Remove android default action bar
  • Proper way to get DisplayMetrics: getResources() or getWindowManager()
  • Context wants FLAG_ACTIVITY_NEW_TASK but I've already set that flag
  • Encode/Decode AndroidManifest.xml inside APK
  • One Solution collect form web for “How to navigate one page to another page in android phonegap?”

    Code to navigate to another html page.

              <script type="text/javascript" charset="utf-8" src="cordova-1.5.0.js"></script>      
              <script type="text/javascript" charset="utf-8">
                 function onLoad()
                      document.addEventListener("deviceready", onDeviceReady, true);
                 function onDeviceReady()
                      // navigator.notification.alert("PhoneGap is working");
                 function callAnothePage()
                    window.location = "test.html";
      <body onload="onLoad();">
            <h1>Welcome to PhoneGap</h1>
            <h2>Edit assets/www/index.html</h2>
            <button name="buttonClick" onclick="callAnothePage()">Click Me!</button>

    Code for back Event.

    <script type="text/javascript" charset="utf-8">
                 document.addEventListener("deviceready", onDeviceReady, true);
                 function onDeviceReady()
                       document.addEventListener("backbutton", BackKeyDown, true);
                 function BackKeyDown()
                     //;  // For Exit Application
    Android Babe is a Google Android Fan, All about Android Phones, Android Wear, Android Dev and Android Games Apps and so on.