Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <meta name="viewport" content="width=device-width, initial-scale=1">
- <!-- Add icon library -->
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
- <style>
- body {font-family: Arial, Helvetica, sans-serif;}
- * {box-sizing: border-box;}
- .input-container {
- display: -ms-flexbox; /* IE10 */
- display: flex;
- width: 100%;
- margin-bottom: 15px;
- }
- .icon {
- padding: 10px;
- background: dodgerblue;
- color: white;
- min-width: 50px;
- text-align: center;
- }
- .input-field {
- width: 100%;
- padding: 10px;
- outline: none;
- }
- .input-field:focus {
- border: 2px solid dodgerblue;
- }
- /* Set a style for the submit button */
- .btn {
- background-color: dodgerblue;
- color: white;
- padding: 15px 20px;
- border: none;
- cursor: pointer;
- width: 100%;
- opacity: 0.9;
- }
- .btn:hover {
- opacity: 1;
- }
- p {
- padding: 1px;
- margin-top: 5px;
- }
- .lol { font-family: tahoma;text-decoration:none; }
- .button {
- background-color: blue;
- border: none;
- color: white;
- padding: 15px 32px;
- text-align: center;
- text-decoration: none;
- display: inline-block;
- font-size: 16px;
- margin: 4px 2px;
- cursor: pointer;
- float: right;
- }
- .autocomplete-items {
- position: absolute;
- border: 1px solid #d4d4d4;
- border-bottom: none;
- border-top: none;
- z-index: 99;
- /*position the autocomplete items to be the same width as the container:*/
- top: 100%;
- left: 0;
- right: 0;
- }
- .autocomplete-items div {
- padding: 10px;
- cursor: pointer;
- background-color: #fff;
- border-bottom: 1px solid #d4d4d4;
- }
- .autocomplete-items div:hover {
- /*when hovering an item:*/
- background-color: #e9e9e9;
- }
- .autocomplete-active {
- /*when navigating through the items using the arrow keys:*/
- background-color: DodgerBlue !important;
- color: #ffffff;
- }
- .autocomplete {
- /*the container must be positioned relative:*/
- position: relative;
- display: inline-block;
- }
- .booking { display: none;overflow: hidden; }
- .next { border: 1px solid gray;cursor:pointer;padding: 3px 8px;background-color:blue;color:white; }
- </style>
- </head>
- <body>
- <form action="submit.php" style="max-width:500px;margin:auto" method="post">
- <h2><u>Personal Info:</u></h2>
- <i>First Name Last Name</i>
- <div class="input-container">
- <i class="fa fa-user icon"></i>
- <input class="input-field" type="text" placeholder="First Name" name="first-name">
- <i class="fa fa-user icon"></i>
- <input class="input-field" type="text" placeholder="Last Name" name="last-name">
- </div>
- <center><i>Address</i></center><div class="input-container">
- <i class="fa fa-flag icon"></i>
- <input class="input-field" type="text" placeholder="Address" name="address">
- </div>
- <center><i>City</i></center><div class="input-container">
- <i class="fa fa-flag icon"></i>
- <input class="input-field" type="text" placeholder="City" name="city">
- </div>
- <center><i>State</i></center><div class="input-container">
- <i class="fa fa-flag icon"></i>
- <input class="input-field" type="text" placeholder="State" name="state">
- </div>
- <center><i>E-mail</i></center><div class="input-container">
- <i class="fa fa-envelope icon"></i>
- <input class="input-field" type="text" placeholder="palarcatravelagency@example.com" pattern="[a-z0-9._%+-]+@[a-z0-9.-]+\.[a-z]{2,3}$" name="email">
- </div>
- <i>Zip Code Phone Number</i><div class="input-container">
- <i class="fa fa-flag icon"></i>
- <input class="input-field" type="text" placeholder="ZipCode" name="zipcode">
- <i class="fa fa-phone icon"></i>
- <input class="input-field" type="text" placeholder="+639661694787" name="phonenumber">
- </div>
- <br><Br>
- <a class="next">NEXT</a>
- <div class="booking">
- <h2><u>Booking Form:</u></h2>
- <div class="autocomplete" style="width:500px;">
- <center><i>From:</i></center><div class="input-container">
- <i class="fa fa-plane icon"></i>
- <input class="input-field" type="text" id="myInput" placeholder="Select Origin" name="origin">
- </div></div>
- <div class="autocomplete" style="width:500px;">
- <center><i>To:</i></center> <div class="input-container">
- <i class="fa fa-plane icon"></i>
- <input class="input-field" type="text" id="destine" placeholder="Select Destination" name="destination">
- </div></div><Br>
- <i>departure date return date</i>
- <div class="input-container">
- <i class="fa fa-calendar-check-o icon"></i>
- <input class="input-field" type="date" placeholder="Check In" name="check-in">
- <i class="fa fa-calendar-times-o icon"></i>
- <input class="input-field" type="date" placeholder="Check-out" name="email">
- </div>
- <br><br><br>
- <center><a href="#" class="button" type="button" name="button">Next</a></center>
- </form>
- </div>
- <script>
- function autocomplete(inp, arr) {
- var currentFocus;
- inp.addEventListener("input", function(e) {
- var a, b, i, val = this.value;
- closeAllLists();
- if (!val) { return false;}
- currentFocus = -1;
- a = document.createElement("DIV");
- a.setAttribute("id", this.id + "autocomplete-list");
- a.setAttribute("class", "autocomplete-items");
- this.parentNode.appendChild(a);
- for (i = 0; i < arr.length; i++) {
- if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
- b = document.createElement("DIV");
- b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
- b.innerHTML += arr[i].substr(val.length);
- b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
- b.addEventListener("click", function(e) {
- inp.value = this.getElementsByTagName("input")[0].value;
- closeAllLists();
- });
- a.appendChild(b);
- }
- }
- });
- inp.addEventListener("keydown", function(e) {
- var x = document.getElementById(this.id + "autocomplete-list");
- if (x) x = x.getElementsByTagName("div");
- if (e.keyCode == 40) {
- currentFocus++;
- addActive(x);
- } else if (e.keyCode == 38) {
- currentFocus--;
- addActive(x);
- } else if (e.keyCode == 13) {
- e.preventDefault();
- if (currentFocus > -1) {
- if (x) x[currentFocus].click();
- }
- }
- });
- function addActive(x) {
- if (!x) return false;
- removeActive(x);
- if (currentFocus >= x.length) currentFocus = 0;
- if (currentFocus < 0) currentFocus = (x.length - 1);
- x[currentFocus].classList.add("autocomplete-active");
- }
- function removeActive(x) {
- for (var i = 0; i < x.length; i++) {
- x[i].classList.remove("autocomplete-active");
- }
- }
- function closeAllLists(elmnt) {
- var x = document.getElementsByClassName("autocomplete-items");
- for (var i = 0; i < x.length; i++) {
- if (elmnt != x[i] && elmnt != inp) {
- x[i].parentNode.removeChild(x[i]);
- }
- }
- }
- document.addEventListener("click", function (e) {
- closeAllLists(e.target);
- });
- }
- var countries = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central Arfrican Republic","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica","Cote D Ivoire","Croatia","Cuba","Curacao","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauro","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","North Korea","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Pierre & Miquelon","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","St Kitts & Nevis","St Lucia","St Vincent","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor L'Este","Togo","Tonga","Trinidad & Tobago","Tunisia","Turkey","Turkmenistan","Turks & Caicos","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States of America","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Virgin Islands (US)","Yemen","Zambia","Zimbabwe"];
- autocomplete(document.getElementById("myInput"), countries);
- </script>
- <script>
- function autocomplete(inp, arr) {
- var currentFocus;
- inp.addEventListener("input", function(e) {
- var a, b, i, val = this.value;
- closeAllLists();
- if (!val) { return false;}
- currentFocus = -1;
- a = document.createElement("DIV");
- a.setAttribute("id", this.id + "autocomplete-list");
- a.setAttribute("class", "autocomplete-items");
- this.parentNode.appendChild(a);
- for (i = 0; i < arr.length; i++) {
- if (arr[i].substr(0, val.length).toUpperCase() == val.toUpperCase()) {
- b = document.createElement("DIV");
- b.innerHTML = "<strong>" + arr[i].substr(0, val.length) + "</strong>";
- b.innerHTML += arr[i].substr(val.length);
- b.innerHTML += "<input type='hidden' value='" + arr[i] + "'>";
- b.addEventListener("click", function(e) {
- inp.value = this.getElementsByTagName("input")[0].value;
- closeAllLists();
- });
- a.appendChild(b);
- }
- }
- });
- inp.addEventListener("keydown", function(e) {
- var x = document.getElementById(this.id + "autocomplete-list");
- if (x) x = x.getElementsByTagName("div");
- if (e.keyCode == 40) {
- currentFocus++;
- addActive(x);
- } else if (e.keyCode == 38) {
- currentFocus--;
- addActive(x);
- } else if (e.keyCode == 13) {
- e.preventDefault();
- if (currentFocus > -1) {
- if (x) x[currentFocus].click();
- }
- }
- });
- function addActive(x) {
- if (!x) return false;
- removeActive(x);
- if (currentFocus >= x.length) currentFocus = 0;
- if (currentFocus < 0) currentFocus = (x.length - 1);
- x[currentFocus].classList.add("autocomplete-active");
- }
- function removeActive(x) {
- for (var i = 0; i < x.length; i++) {
- x[i].classList.remove("autocomplete-active");
- }
- }
- function closeAllLists(elmnt) {
- var x = document.getElementsByClassName("autocomplete-items");
- for (var i = 0; i < x.length; i++) {
- if (elmnt != x[i] && elmnt != inp) {
- x[i].parentNode.removeChild(x[i]);
- }
- }
- }
- document.addEventListener("click", function (e) {
- closeAllLists(e.target);
- });
- }
- var countries = ["Afghanistan","Albania","Algeria","Andorra","Angola","Anguilla","Antigua & Barbuda","Argentina","Armenia","Aruba","Australia","Austria","Azerbaijan","Bahamas","Bahrain","Bangladesh","Barbados","Belarus","Belgium","Belize","Benin","Bermuda","Bhutan","Bolivia","Bosnia & Herzegovina","Botswana","Brazil","British Virgin Islands","Brunei","Bulgaria","Burkina Faso","Burundi","Cambodia","Cameroon","Canada","Cape Verde","Cayman Islands","Central Arfrican Republic","Chad","Chile","China","Colombia","Congo","Cook Islands","Costa Rica","Cote D Ivoire","Croatia","Cuba","Curacao","Cyprus","Czech Republic","Denmark","Djibouti","Dominica","Dominican Republic","Ecuador","Egypt","El Salvador","Equatorial Guinea","Eritrea","Estonia","Ethiopia","Falkland Islands","Faroe Islands","Fiji","Finland","France","French Polynesia","French West Indies","Gabon","Gambia","Georgia","Germany","Ghana","Gibraltar","Greece","Greenland","Grenada","Guam","Guatemala","Guernsey","Guinea","Guinea Bissau","Guyana","Haiti","Honduras","Hong Kong","Hungary","Iceland","India","Indonesia","Iran","Iraq","Ireland","Isle of Man","Israel","Italy","Jamaica","Japan","Jersey","Jordan","Kazakhstan","Kenya","Kiribati","Kosovo","Kuwait","Kyrgyzstan","Laos","Latvia","Lebanon","Lesotho","Liberia","Libya","Liechtenstein","Lithuania","Luxembourg","Macau","Macedonia","Madagascar","Malawi","Malaysia","Maldives","Mali","Malta","Marshall Islands","Mauritania","Mauritius","Mexico","Micronesia","Moldova","Monaco","Mongolia","Montenegro","Montserrat","Morocco","Mozambique","Myanmar","Namibia","Nauro","Nepal","Netherlands","Netherlands Antilles","New Caledonia","New Zealand","Nicaragua","Niger","Nigeria","North Korea","Norway","Oman","Pakistan","Palau","Palestine","Panama","Papua New Guinea","Paraguay","Peru","Philippines","Poland","Portugal","Puerto Rico","Qatar","Reunion","Romania","Russia","Rwanda","Saint Pierre & Miquelon","Samoa","San Marino","Sao Tome and Principe","Saudi Arabia","Senegal","Serbia","Seychelles","Sierra Leone","Singapore","Slovakia","Slovenia","Solomon Islands","Somalia","South Africa","South Korea","South Sudan","Spain","Sri Lanka","St Kitts & Nevis","St Lucia","St Vincent","Sudan","Suriname","Swaziland","Sweden","Switzerland","Syria","Taiwan","Tajikistan","Tanzania","Thailand","Timor L'Este","Togo","Tonga","Trinidad & Tobago","Tunisia","Turkey","Turkmenistan","Turks & Caicos","Tuvalu","Uganda","Ukraine","United Arab Emirates","United Kingdom","United States of America","Uruguay","Uzbekistan","Vanuatu","Vatican City","Venezuela","Vietnam","Virgin Islands (US)","Yemen","Zambia","Zimbabwe"];
- autocomplete(document.getElementById("destine"), countries);
- </script>
- <script>
- var coll = document.getElementsByClassName("next");
- var i;
- for (i = 0; i < coll.length; i++) {
- coll[i].addEventListener("click", function() {
- this.classList.toggle("active");
- var content = this.nextElementSibling;
- if (content.style.display === "block") {
- content.style.display = "none";
- } else {
- content.style.display = "block";
- }
- });
- }
- </script>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement