Advertisement
madhulika91

The html file

Jul 11th, 2012
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
HTML 1.92 KB | None | 0 0
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
  2. "http://www.w3.org/TR/html4/strict.dtd">
  3. <html>
  4. <head>
  5.  
  6. <!-- Change this if you want to allow scaling -->
  7.    <meta name="viewport" content="width=default-width; user-scalable=no" />
  8.    <meta http-equiv="Content-type" content="text/html;charset=utf-8">
  9.  
  10.    <title>Trial app</title>
  11.    <link rel="stylesheet" href="thestylesheet.css" type="text/css">
  12.     <script type="text/javascript" charset="utf-8" src="javascript1.js"></script>
  13.     <script type="text/javascript" charset="utf-8" src="javascript2.js"></script>
  14.     <script type="text/javascript" charset="utf-8" src="cordova-1.8.0.js"></script>
  15.    
  16.     <script>
  17.     $(document).ready(function () {
  18.         $("#btn").click( function() {
  19.        
  20.             var id = $('#id').val();
  21.              var name =  $('#name').val();
  22.               var Address = $('#Address').val();
  23.              
  24.               var person = new Array();
  25.               person[0] = id;
  26.               person[1] = name;
  27.               person[2] = Address;
  28.               var topost;
  29.              
  30.            
  31.         $.ajax({
  32.             url: "http://localhost/connection.php",
  33.             type: "POST",
  34.                
  35.             data : {topost : JSON.stringify(person)},
  36.             datatype: "json",
  37.             success: function(data) { alert(data); }
  38.         });
  39.         return false;
  40.     });
  41.     });
  42. </script>
  43. </head>
  44.  
  45. <body>
  46.  
  47. <div data-role="header">
  48.         <h1>National Innovation Foundation</h1>
  49.     </div><!-- /header -->
  50. <div data-role="content">
  51.     <form id="target" method="post">
  52.         <label for="id">
  53.             <input type="text" id="id" placeholder="ID">
  54.         </label>
  55.  
  56.         <label for="name">
  57.             <input type="text" id="name" placeholder="Name">
  58.         </label>
  59.  
  60.         <label for="Address">
  61.             <input type="text" id="Address" placeholder="Address">
  62.         </label>
  63. <div id="btn" data-role="button" data-icon="star" data-theme="e">Add record</div>
  64.         <!--<input type="submit" value="Add record" data-icon="star" data-theme="e">
  65.         -->
  66.     </form>
  67.  
  68. </div>
  69. </body>
  70. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement