Hi,
try the following in your check_login.thtml:
echo $javascript->codeBlock("window.location = '".$redirectURL."'");
or maybe because its ajax:
<?php
header('Content-type: application/x-javascript');
echo "window.location = '".$redirectURL."'";
?>
You may not need the header if you set 'evalScripts' => true in the
ajax call.
Hope this helps,
Michael
On 21 Jul., 14:20, vibhor <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I am stuck at a point wherein i need to redirect to another page using
> ajax. i have read many topics over here and tried many of them but
> could not succeed. Perhaps there is something wrong in my code..Hence,
> i thought to post this issue here.
>
> Some details:
>
> Initially, I have a login page, which after successful authentication
> process must be replaced by another page. The redirection happens but
> the new page is loaded inside the div meant for error messages.
>
> I tried the trick that uses javascript(present in my code) but no
> luck( i am bit confused using that approach)..
>
> Also, I am not able to validate my fields despite following the cake
> conventions.
>
> Can some one please review my code and reply. I am sure this will
> definitely help many others like me.
>
> here is the link for my code:http://pastecode.net/?action=viewpost&tag=3018
>
> Please help. Thanks
>
> Vibhor
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---