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.


Messages In This Thread
Problem in login system while using Ajax - by El Forum - 10-02-2009, 10:14 AM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 04:20 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 06:00 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 06:47 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 07:10 PM
Problem in login system while using Ajax - by El Forum - 10-02-2009, 07:30 PM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 01:25 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 04:14 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 04:58 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 05:39 AM
Problem in login system while using Ajax - by El Forum - 10-03-2009, 05:46 AM



Theme © iAndrew 2016 - Forum software by © MyBB