Hi, I've been using google for too long now and I still haven't found what I am looking for. I'm just trying to submit a form using ajax (Cake 1.2) and I'm going through hell. It is supposed to be simple with cakephp so I must be really bad... Without ajax it works.
Here's my form : <?php echo $ajax->form('index', 'post', array('update' => 'content', 'id' => 'testform')); ?> <?php echo $form->input('critere_tri', array('options' => array("Participant.magasin_id" => "Magasin"))); ?> <?php echo $ajax->submit("Go! Go! Go!", array("with" => "testform")); ? > <?php pr($data); // To verify if the request is successful ?> The controller : class CreationsController extends AppController { var $name = "Creations"; var $components = array("Auth"); var $uses = array("Participant", "Creation"); var $helpers = array('Form', 'Ajax'); function index() { if(!empty($this->data) $this->set($this->data); // To verify if the request is successful $this->set("participantsMagasinCreations", $this->Participant- >findAll()); } } I want to get the value from the list and use it in the findAll() order condition. For the moment I just display it. But it doesn't work. There's the following javascript error : "testform is not defined". And I checked in the source of the document, the form has "id='testform' ... Thanks in advance for helping me. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to cake-php@googlegroups.com 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 -~----------~----~----~----~------~----~------~--~---