Advertisement
Guest User

Untitled

a guest
Nov 11th, 2015
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.91 KB | None | 0 0
  1. Html code :
  2. <form action="" method="post" id="#get_pnr" >
  3. <h3>Enter your PNR number in the box below and click on "Get PNR Status" button to check your PNR status.</h3><br /><br />
  4. <table border="0">
  5. <tr><td><input type="text" name="txt1" placeholder="Enter Your PNR Number"></td></tr>
  6. <tr><td></td></tr>
  7. <tr><td><center><input type="submit" name="submit" value="pnr_status" id ="submit" ><center></td></tr>
  8. </table>
  9.  
  10. </form>
  11.  
  12.  
  13.  
  14. AJAX code :
  15.  
  16. <script>
  17. $(document).ready(function(){
  18.  
  19. $('#submit').click(function(){
  20.  
  21. $.post("retrieve_pnr.php", $("#get_pnr").serialize(), function(response) {
  22. $('#success').html(response);
  23.  
  24. //$('#success').hide('slow');
  25. });
  26. return false;
  27.  
  28.  
  29. });
  30.  
  31. });
  32. </script>
  33.  
  34. PHP code :
  35.  
  36. <?php
  37.  
  38.  
  39. echo ' Hiiiiii <script type="text/javascript"> $(document).ready(function(){
  40. $("#get_pnr").hide();
  41. });</script>';
  42.  
  43.  
  44.  
  45. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement