That makes sense conceptually, but how to translate that to jquery code ? How to verify the returning header from the php file. and then redirect within jquery ?
thanks, Ⓙⓐⓚⓔ wrote: > > yup you have to redirect them! you can look at the header, and see > that the response has a custom header that tells you to give up and > get a new password. > > You can't use the normal redirect because that would just return the > login page to the ajax request... but then you could realize that it's > the login page and then send them to the real login page. > > Does that make sense? > the pure xml way would be to return a different xml format with the > error message in it instead of the normal data. > > On 1/14/07, unohoo <[EMAIL PROTECTED]> wrote: >> >> I use the AJAXsubmit and ajaxform at a couple of places in my php app. >> So, >> when a user clicks on 'change privacy', a form with radio buttons appears >> to >> change privacy settings of photo. >> >> the form relies on ajaxsubmit for submission. Now, at the target php >> file, I >> want to first check if the user session is still valid..And only if it is >> valid should the php file go ahead and process the privacy settings user >> set >> in the form. If session is invalid, i redirect him back to the login >> page. >> >> Problem that happens is that since the submission is by AJAX, the display >> stays on the same page even though the session of the user has become >> invalid. the redirect doesnt work correctly. >> >> what wud be the best way to accomplish what I'm trying to do -- is it >> possible for me to check whether the session is valid within the >> javascript >> it self...and if not valid, redirect to login page ? >> >> thnx. >> >> >> -- >> View this message in context: >> http://www.nabble.com/Jquery-AJAXsubmit-and-cookie-tf3011518.html#a8363786 >> Sent from the JQuery mailing list archive at Nabble.com. >> >> >> _______________________________________________ >> jQuery mailing list >> [email protected] >> http://jquery.com/discuss/ >> > > > -- > Ⓙⓐⓚⓔ - יעקב ʝǡǩȩ ᎫᎪᏦᎬ > _______________________________________________ > jQuery mailing list > [email protected] > http://jquery.com/discuss/ > > -- View this message in context: http://www.nabble.com/Jquery-AJAXsubmit-and-cookie-tf3011518.html#a8364192 Sent from the JQuery mailing list archive at Nabble.com. _______________________________________________ jQuery mailing list [email protected] http://jquery.com/discuss/
