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 se
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
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 th
I was looking around for an old test I did... can't find it ..
but, the complete callback of the ajax call gives you the full
headers, and you can parse for the errors you want to send.
when you realize that it needs a new login
window.location = "login.php"
and you are outta there!
On 1/14/07,
and on the php side I just set the custom header by the header() function in
PHP ?
thanks,
pranav.
Ⓙⓐⓚⓔ wrote:
>
> I was looking around for an old test I did... can't find it ..
>
> but, the complete callback of the ajax call gives you the full
> headers, and you can parse for the errors you w
I'm a perl guy... but you get the idea!
On 1/14/07, unohoo <[EMAIL PROTECTED]> wrote:
>
> and on the php side I just set the custom header by the header() function in
> PHP ?
>
> thanks,
> pranav.
>
> Ⓙⓐⓚⓔ wrote:
> >
> > I was looking around for an old test I did... can't find it ..
> >
> > but, t
xml.getResponseHeader('x-your-header-name') should get it from an ajax
call's complete callback.
On 1/14/07, Ⓙⓐⓚⓔ <[EMAIL PROTECTED]> wrote:
> I'm a perl guy... but you get the idea!
>
> On 1/14/07, unohoo <[EMAIL PROTECTED]> wrote:
> >
> > and on the php side I just set the custom header by the h