var Objdata = {}; Objdata.username = username; Objdata.password = password; var urls = "gallries.aspx/CheckUser"; alert(username + password); $.ajax({ type: "POST", url: urls, data: "{'username':'" + username + "','password':'" + password + "'}", contentType: "application/json; charset=utf-8", dataType: "json", success: function (response) { if (response.d == true) { alert(username); $.cookie("loggedInUser", username); alert($.cookie("loggedInUser")); alert('Login Success'); _loginMsg.addClass("success").removeClass("error"); _loginMsg.html("Login was successful!"); $('.user_login').animate({ 'top': '-165px' }, 800); $('#modal').fadeOut(500); }
$.cookie("loggedInUser", username, { expires : 10 }); //expires in 10 days
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)