"signIn"
Bootstrap 3.0.0 Snippet by adriansolisz

<link href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css" rel="stylesheet" id="bootstrap-css"> <script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"></script> <script src="//code.jquery.com/jquery-1.11.1.min.js"></script> <!------ Include the above in your HEAD tag ----------> <!doctype html> <html> <head> <meta charset="utf-8"> <title>Sign in</title> <link rel="stylesheet" type="text/css" href="CSS/signIn.css"> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.2.1/jquery.min.js"></script> </head> <script type="text/javascript"> $(document).ready(function(){ // function redirect(){ //// debugger; // window.location.replace("http://www.google.com"); // } $("#signIn").click(function(){ debugger; window.location="http://www.google.com"; }); }); </script> <body> <header id="top"> <img src="img/logo/logoT.png" alt="Everything adventures logo" id="logo" title="Everything adeventures logo"> <p>EVERYTHING ADVENTURES</p> </header> <div id="info"> <form> <h4>Username:</h4> <input type="text" id="userInput"><br> <h4>Password:</h4> <input type="text" id="passInput"><br> <button type="submit" id="signIn" class="b1"><h4>Sign In</h4></button> <a href="signUp.html" target="_self"><button type="button" id="signUp" title="First time customers click here"><h4>Sign Up</h4></button></a> </form> </div> </body> </html>
@charset "utf-8"; #logo{ height: 135px; width: 140px; float: left; } header#top{ position:fixed; width: 100%; height: 125px; color: forestgreen; text-align: center; font-family: Stencil Std, fantasy; font-style:normal; font-size: 42px; text-decoration: underline; text-decoration-color:gold; background-color:mediumspringgreen; padding-left: 15px; padding-right: 15px; padding-bottom: 15px; } #info{ padding-top: 125px; text-align: center; } h4{ font-family: Courier New, monospace; color:forestgreen; font-size: 18px; } #signIn{ display:inline-block; margin-top: 40px; background-color: mediumspringgreen; border: none; border-radius: 10px; height: 58px; transition-duration: 0.4s; cursor: pointer; } #signUp{ height: 58px; border-radius: 10px; display:inline-block; margin-top: 40px; background-color: gold; border: none; margin-left: 30px; transition-duration: 0.4s; cursor: pointer; } td a:link{ text-decoration: none; color: forestgreen; } td a:hover{ text-decoration: none; color: red; } td a:visited{ text-decoration: none; color: forestgreen; } .b1{ }
var globalUsers=[]; //object "user" constructor var user=function(id,firstName,lastName,age,email,address,phone,cardNumber,cvc,expire,username,password){ this.id=id; this.firstName=firstName; this.lastName=lastName; this.age=age; this.email=email; this.address=address; this.phone=phone; this.cardNumber=cardNumber; this.cvc=cvc; this.expire=expire; this.username=username; this.password=password; this.state="active"; this.administrator=false; this.cart=[]; this.wishList=[]; //method to add products to the wishlist this.addToCart=function(product,qty){ //creates another object from the received product and takes only id, price and qty to the cart. var pLite={ id:product.getId(), price:product.getPrice(), quantity:qty }; this.cart.push(pLite); }; }; //method to process new admin function processNewAdmin(){ // "use strict"; //takes values from the form newAdmin into variables var newId=document.getElementById("idInput").value; var newName=document.getElementById("nameInput").value; var newLastname=document.getElementById("lastnameInput").value; var newUser=document.getElementById("usernameInput").value; var newPass=document.getElementById("passwordInput").value; var confirm=document.getElementById("confirmInput").value; if(confirm!=newPass){ document.getElementById("confirmInput").value=""; document.getElementById("passwordInput").value=""; var message="The data in the fields 'Password' and 'Confirm password' do not match. Please try again"; alert(message); } else{ //id,firstName,lastName,age,email,address,phone,cardNumber,cvc,expire,username,password //creates a new instance of user object with these variables. var nAdmin=new user(newId,newName,newLastname,0,"","","",0,0,"",newUser,newPass); //nAdmin.administrator=true; globalUsers.push(nAdmin); var info="New administrator profile created succesfully!"; var info2="ID: "+nAdmin.id+"\n"+"Name: "+nAdmin.firstName+"\n"+"Lastname: "+nAdmin.lastName; alert(info+"\n"+info2); } } function processNewBuyer(){ // "use strict"; var id=document.getElementById("idInput").value; var name=document.getElementById("nameInput2").value; var lastname=document.getElementById("lastnameInput").value; var age=document.getElementById("ageInput").value; var email=document.getElementById("emailInput").value; var card=document.getElementById("cardInput").value; var cvc=document.getElementById("codeInput").value; var exp=document.getElementById("expInput").value; var username=document.getElementById("userInput").value; var pass=document.getElementById("passInput").value; var address=document.getElementById("addressText").value; var confirm=document.getElementById("confirmInput").value; if(confirm!=pass){ document.getElementById("confirmInput").value=""; document.getElementById("passInput").value=""; var message="The data in the fields 'Password' and 'Confirm password' do not match. Please try again"; alert(message); } else{ //id,firstName,lastName,age,email,address,phone,cardNumber,cvc,expire,username,password var nBuyer=new user(id,name,lastname,age,email,address,card,cvc,exp,username,pass); var nName=nBuyer.name; globalUsers.push(nBuyer); console.log(globalUsers[0].email); var info="New user registered succesfully!"; var info2="ID: "+nBuyer.id+"\n"+"Name: "+nBuyer.firstName+"\n"+"Lastname: "+nBuyer.lastName; alert(info+"\n"+info2); } }

Related: See More


Questions / Comments: