Advertisement
Guest User

Untitled

a guest
Jan 21st, 2017
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.81 KB | None | 0 0
  1. <html lang="en">
  2.  
  3. <head>
  4. <meta charset="utf-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1">
  6. <link rel="stylesheet" href="//code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css">
  7. <link rel="stylesheet" href="/resources/demos/style.css">
  8. <script src="https://code.jquery.com/jquery-1.12.4.js"></script>
  9. <script src="https://code.jquery.com/jquery-1.9.1.min.js"></script>
  10. <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
  11. <script>
  12. $( function() {
  13. $ ( "#depdate").datepicker();
  14. $ ( "#retdate").datepicker();
  15. });
  16. </script>
  17.  
  18.  
  19. </head>
  20. <body>
  21. <p> From: <input name = 'from' type = 'text' class="form-control" id='from' oninput='searchAirports1()'></input> </p>
  22. <table id="results1" style="width:50%">
  23. <thead>
  24. <tr>
  25. <th class = "text-center">Name</th>
  26. <th class = "text-center">Region</th>
  27. </tr>
  28. </thead>
  29. <tbody id = "tbody">
  30. <tr></tr>
  31. </tbody>
  32. </table>
  33.  
  34.  
  35. <p> To: <input name = 'to' class="form-control" type = 'text' id= 'to' oninput='searchAirports2()'></input> </p>
  36. <table id="results2" style="width:50%">
  37. <thead>
  38. <tr>
  39. <th class = "text-center">Name</th>
  40. <th class = "text-center">Region</th>
  41. </tr>
  42. </thead>
  43. <tbody id = "tbody">
  44. <tr></tr>
  45. </tbody>
  46. </table>
  47.  
  48. <p> Departure Date: <input type= "text" id='depdate'></input> </p>
  49. <p> Return Date: <input type= "text" id='retdate'></input> </p>
  50.  
  51.  
  52.  
  53. <button type='submit'> Search Flights </button>
  54.  
  55.  
  56. <script>
  57. function searchAirports1() {
  58. $.ajax({
  59. type: 'POST',
  60. url: '/addflight',
  61. data: {
  62. name: document.getElementById('from').value
  63. },
  64. success: function(result) {
  65. console.log(result);
  66. }
  67. });
  68. }
  69. </script>
  70.  
  71.  
  72. </body>
  73. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement