SHARE
TWEET

Untitled

a guest May 31st, 2017 49 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     // Gömmer error
  2.   $('.loginerrors').hide();
  3.     // När den har blivit tryckt
  4.   $(".buttonlogin").click(function() {
  5.       // Göm error
  6.     $('.loginerrors').hide();
  7.             // variabeln för användarnamnet
  8.       var username = $("input#usernamelogin").val();
  9.         if (username == "") {
  10.       $("b#loginusernameerror").show();
  11.       return false;
  12.     }
  13.             // Variblen för lösenordet
  14.         var password = $("input#passwordlogin").val();
  15.         if (password == "") {
  16.             alert("Hej");
  17.       $("b#loginpassworderror").show();
  18.       return false;
  19.     }
  20.  
  21.         var loginString = 'usernamelogin='+ username + '&passwordlogin=' + password;
  22.         //alert (dataString);return false;
  23.        
  24.         $.ajax({
  25.       type: "POST",
  26.       url: "../jqueryphp/loginuser.php",
  27.       data: loginString,
  28.       success: function() {
  29.         $('#contact_form').html("<div id='message'></div>");
  30.         $('#message').html("<h2>Contact Form Submitted!</h2>")
  31.         .append("<p>We will be in touch soon.</p>")
  32.         .hide()
  33.         .fadeIn(1500, function() {
  34.           $('#message').append("<img id='checkmark' src='images/check.png' />");
  35.         });
  36.       }
  37.      });
  38.     return false;
  39.     });
  40. });
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top