Advertisement
Varun_Krishna

Page redirection in phonegap 3.x

Mar 24th, 2014
122
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 5 1.80 KB | None | 0 0
  1. <html>
  2.     <head>
  3.         <meta charset="utf-8" />
  4.         <meta name="format-detection" content="telephone=no" />
  5.         <!-- WARNING: for iOS 7, remove the width=device-width and height=device-height attributes. See https://issues.apache.org/jira/browse/CB-4323 -->
  6.         <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width, height=device-height, target-densitydpi=device-dpi" />
  7.         <link rel="stylesheet" type="text/css" href="css/index.css" />
  8.         <title>Hello World</title>
  9.     </head>
  10.     <body>
  11.         <div class="app">
  12.             <h1>PhoneGap</h1>
  13.             <div id="deviceready" class="blink">
  14.                 <p class="event listening">Connecting to Device</p>
  15.                 <p class="event received">Device is Ready</p>
  16.             </div>
  17.             <input type = "text" placeholder="username" id="inputBox1"/> </br/>
  18.             <input type= "password" placeholder= "password" id="passwordBox1" /><br/>
  19.             <button onclick="submit()" >Log IN</button>
  20.             <button  onClick="reset()">Clear</button>
  21.         </div>
  22.         <script type="text/javascript" src="phonegap.js"></script>
  23.         <script type="text/javascript" src="js/index.js"></script>
  24.         <script type="text/javascript">
  25.             app.initialize();            
  26.         </script>  
  27.          <script type="text/javascript">
  28.             function submit() {
  29.                 alert("You have clicked the log In button");+
  30.                 window.location="inbox.html";          
  31.             }
  32.              function reset() {
  33.                 alert("Are you sure you want to clear the fields?");
  34.                 document.getElementById("inputBox1").value="";
  35.                 document.getElementById("passwordBox1").value="";
  36.              }
  37.         </script>  
  38.     </body>
  39. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement