Re: [symfony-users] Re: ajax in symfony 2

2011-04-19 Thread oscar balladares
Oh, for sure. If you want just to validate a field with ajax and a controller you probably need to grep the EmailField value and attach it to a variable. If you instead want to submit the whole form with JQuery and Ajax you should want to use the .serialize() function (of JQuery + Ajax) So the

Re: [symfony-users] Re: ajax in symfony 2

2011-04-16 Thread oscar balladares
If you just want to return a simple string you probably want to: # Controllers definition { #some logic here return new Response("There are some errors on this field"); ... You must import the namespace for Response : use Symfony\Component\HttpFoundation\Response; 2011/4/15 symfonyM

Re: [symfony-users] Re: ajax in symfony 2

2011-04-14 Thread oscar balladares
The controller should return a template response, a common template (without inheritance of course) 2011/4/14 oscar balladares > With JQuery you can request Marc's controller's route. That should do the > trick. > > > 2011/4/14 Marc MacLeod > >> In your controller: >> >>public function fooA

Re: [symfony-users] Re: ajax in symfony 2

2011-04-14 Thread oscar balladares
With JQuery you can request Marc's controller's route. That should do the trick. 2011/4/14 Marc MacLeod > In your controller: > >public function fooAction() >{ >// Is this an ajax request? >if ($this->container->get('request')->isXmlHttpRequest()) >{ >