Welcome Guest, Not a member yet? Register   Sign In
Problem in login system while using Ajax
#11

[eluser]FutureKing[/eluser]
[quote author="n0xie" date="1254587976"]Just call a function which checks for the message 'user not logged in' like I said before as part of the callback. Else you make your problem more complex than it actually is.

Code:
$.post('somepage', 'some params', function (data) {
      // add this to your ajaxcalls:
      mylogincheckfunction(data);
      // do normal stuff here
      }
);

function mylogincheckfunction(obj){
if (obj.loggedin == false)
   // redirect windows.href or windows.location
}
[/quote]

Thanks.




Theme © iAndrew 2016 - Forum software by © MyBB