Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var userInfo = { };
- function register() {
- userInfo = {
- email: $("#email").val(),
- username: $("#username").val(),
- password: $("#password").val()
- };
- bootbox.dialog({
- title: "Successfully Created Account",
- message: 'Email: ' + userInfo.email + '<br> Username: ' + userInfo.username + '<br> Password: ' + userInfo.password,
- buttons: {
- success: {
- label: "Let's go!",
- className: "btn-success",
- callback: function() {
- window.location.replace("Login3.html");
- }
- }
- }
- });
- localStorage.userName = userInfo.username;
- localStorage.password = userInfo.password;
- }
- function checkForm() {
- var username = document.getElementById("announcement-location").value;
- var password = document.getElementById("announcement-description").value;
- if ((username == localStorage.userName) && (password == localStorage.password)) {
- setInterval(function() { window.location = "home.html";}, 500);
- return false;
- } else {
- bootbox.alert({
- size: 'small',
- message: "Incorrect Password!",
- callback: function(){ window.location.replace("Login3.html")}
- });
- }
- }
- document.getElementById("insert").innerHTML = localStorage.userName;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement