Hi there,

In my action I got the following:

        public function executeUpdate(sfWebRequest $request)
        {
                ...
                if ($this->form->isValid()) {
                        ...
                        $this->redirect('@messages');
                } else {
                        ...
                }
        }

Now I need to find out in my JS that this redirect has happened
because this is called by ajax, so I have to handle it different. I
tried something like that:

                $.ajax({
                        ...
                        complete: function(xmlHttp){
                                console.log("Status: " + xmlHttp.status);
                                console.log("Location: " + 
xmlHttp.getResponseHeader('Location'));
                                if(xmlHttp.status.toString()[0]=='3'){
                                        top.location.href = 
xmlHttp.getResponseHeader('Location');
                                }
                        }
                });

But the status is always 200 and the location empty.
So I tried the following instead of the redirect:

                        header("HTTP/1.0 300 Redirected");
                        header('Location: http://localhost/frontend_dev.php/');

Now location works but status is still 200.

Any solutions how to solve this?

Regards

Eric
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"symfony users" group.
To post to this group, send email to symfony-users@googlegroups.com
To unsubscribe from this group, send email to 
symfony-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/symfony-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to