|
I'm progressing... slowly. I renamed my ajax_index.thtml view in delete.thtml If I modify my delete() method this way: function delete($id) { if ($this->Slideshow->del($id)) { $this->set('data', 'blah'); } } I got some data back, so the Ajax call & retrieve is functioning. But if I do : function delete($id) { if ($this->Slideshow->del($id)) { $this->set('data', $this->Slideshow->findAll()); } } then no answer. After that I tried unsuccessfully to test with $this->action = ''; and $this->index(); like in Gwoo's rdbloggery code. for instance : function delete($id) { if ($this->Slideshow->del($id)) { $this->action = ''; $this->index(); $this->action = ''; $this->render('delete', 'ajax'); } } It produces a Fatal error: Call to a member function on a non-object in... Progress is slow... :'( [EMAIL PROTECTED] wrote: Well if Firebug shows you the XMLHTTPRequest with nothing in it then you aren't getting a response back. So, that response from the delete method is nothing and not what you are intending it to be.The way I have my update div's setup is I have a method that creates only that div's content. Then, in the master page the method (commonly view) returns my update div method to a variable that is echoed in the view.thtml. Hope that makes sense. I think it is the manner of how your methods and templates are assembled. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~--- |
