Hey,

Thanks for the pointers.  After some confusion and searching here i 
have overwritten the redirect() function in AppController like so: -

class AppController extends Controller {

        var $components = array("RequestHandler");

        function redirect($url) {
                if($this->RequestHandler->isAjax()) {
                        echo "got here";
                        $this->requestAction($url, array("ajax"));
                        exit(0);
                } else {
                        parent::redirect($url);
                        exit(0);
                }
        }

}

But this doesn't seem to have helped, and firebug spits back the 
request at me with "got here" but not the page i have requested with 
the requestAction($url).  I really have no idea what else to try, I 
was convinced that the re-written redirect() would have it covered as 
it is mentioned many times around here, but still something is wrong.

Oddly enough if i type the url i wanted to redirect to in the address 
bar directly after the failed redirect, the action has definately been 
called as it has correctly set my session data and displays the page 
with the "xyz is logged on".  So its calling the action but not 
rendering the page it seems.

Help!!

On Jan 30, 11:03 am, "AD7six" <[EMAIL PROTECTED]> wrote:
> Hi Quincy,
>
> On Jan 30, 11:08 am, "quincy" <[EMAIL PROTECTED]> wrote:
>
> > I might point out (don't think i did initially) that i'm using
> > Ajax.  Maybe that has something to do with it.If you use Firefox and 
> > firebug, it will tell you
> 1) if you have a js error
> 2) if there was an ajax request
> 3) what the response was.
>
> If you don't have a js error there are 3 realistic possibilites
> 1) Nothing is sent back
> 2) You haven't nominated an element to put the result in
> 3) You have named an element to put the result in but no element
> exists with that id.
>
> Look for $options['update'] onhttp://manual.cakephp.org/chapter/
> helpers for a little more info, or, collect $200, pass go and go
> straight to the api/source.
>
> HTH,
>
> AD7six
> PS. If you redirect in an ajax request, you are going to end up
> sending a full page (becuase you will lose the "this is an ajax
> request" info) back to the browser and get cascading layouts. Either
> override the redirect method in your app controller and user
> requestAction if it's an ajax request, or send back some js to force
> the browser to redirect to the correct url
> Please note:
> The manual/bakery is a good place to start any quest for info.
> You may get your answer quicker by asking on
> the IRC Channel (you can access it with just a browser
> here:http://irc.cakephp.org).


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" 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
-~----------~----~----~----~------~----~------~--~---

Reply via email to