First of all why the onClick? link_to_remote creates a link with an onClick for you.
To get the ajax to update the value of a form you will need to use JSON encoding in your action to return the value you want then you can use the "complete" callback option to set the value from the returned data. On Wed, Oct 28, 2009 at 3:26 AM, Martin Ibarra Cervantes < ibarra.cervan...@gmail.com> wrote: > > i have a gallery with gallerific but when change the picture i need > change the ID on my form its possible change the value with the ajax. > > > > <div id="description"></div> > > onClick=" > <?php echo link_to_remote(array( > 'update' => 'description', > 'url' => 'retratos/show?id='.$imagen->getId(), > )) ?> > " > > > retratos the model > show is the action and in the action i have this. > > > public function executeShow(sfWebRequest $request) > { > $this->form = new MrImagenComentarioForm(); > $this->form->setDefault('id_imagen', $this->getParam( 'id')); > $this->setTemplate('show'); > } > > id_imagen is i hidden in my form. > > > > -- Gareth McCumskey http://garethmccumskey.blogspot.com twitter: @garethmcc --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---