Guest User

Untitled

a guest
Dec 29th, 2017
175
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.11 KB | None | 0 0
  1. $.ajax({
  2. type : "POST",
  3. url : "?",
  4. dataType: "json",
  5. data : "username=" + encodeURIComponent($('input[name="username"]').val()) + "&password=" + encodeURIComponent($('input[name="password"]').val()) + "&antiForgeryToken=d98188e0f56bafa75180591e38d189ee",
  6. success : function(json) {
  7. if(json.status == 'success') {
  8. window.parent.location.href = json.returnUrl;
  9. window.parent.$.fancybox.close();
  10. } else {
  11. $('#slfErrorAlert').show();
  12. $('.spispinner').hide();
  13. $maindiv.removeAttr("disabled");
  14. $maindiv.removeClass("instaclass31");
  15. }
  16. }
  17. });
  18. });
  19.  
  20. $browser = new SimpleBrowser();
  21. $str = '?username=aaa&password=bbb&antiForgeryToken=d98188e0f56bafa75180591e38d189ee';
  22. $json = json_encode($str);
  23. $browser->post($httpsPage, $json);
Add Comment
Please, Sign In to add comment