Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $.ajax({
- type: 'GET',
- url: '/AccountService/User',
- dataType: 'xml',
- username: $("#LoginEmail").val(),
- password: $("#LoginPassword").val(),
- success: function (data, status, XMLHttpRequest)
- {
- var date = new Date();
- date.setTime(date.getTime() + 3 * 60 * 60 * 1000);
- $("span#topbarUsername").text($(data).find("FirstName").text());
- document.cookie = "LoggedIn=true; expires=" + date.toUTCString() + "; path=/";
- },
- error: function (XMLHttpRequest, textStatus, errorThrown)
- {
- $("span#topbarUsername").text("Guest");
- }
- });
Add Comment
Please, Sign In to add comment