Hello Oscar,

thanks you for the replays..

can you show me an exemple of sending an ajax request with jquery ??

i tried a lot of things (.ajax(), .get()...) but il my ajaxAction,
this test is skipped : (not an XMLHttpRequest())
if ($this->container->get('request')->isXmlHttpRequest())
        {
            //some code here
        }

i want to validate the email input (onblur)

thanks ;)


On 16 avr, 19:20, oscar balladares <liebegr...@gmail.com> wrote:
> If you just want to return a simple string you probably want to:
>
> # Controllers definition {
> #some logic here
>
> return new Response("</b>There are some errors on this field</b>");
>
> ...........
>
> You must import the namespace for Response :
>
> use Symfony\Component\HttpFoundation\Response;
>
> 2011/4/15 symfonyMan <ezziani.cha...@gmail.com>
>
> > Hello,
>
> > thanks for all this responses.
>
> > the controller must return a template ?
>
> > Me, I need ajax just for validate email, and print "ok" next to the
> > email field...
>
> > sorry i have a bad english :)
>
> > thnaks
>
> > On 15 avr, 00:12, oscar balladares <liebegr...@gmail.com> wrote:
> > > The controller should return a template response, a common template
> > (without
> > > inheritance of course)
>
> > > 2011/4/14 oscar balladares <liebegr...@gmail.com>
>
> > > > With JQuery you can request Marc's controller's route. That should do
> > the
> > > > trick.
>
> > > > 2011/4/14 Marc MacLeod <marbe...@gmail.com>
>
> > > >> In your controller:
>
> > > >>    public function fooAction()
> > > >>    {
> > > >>        // Is this an ajax request?
> > > >>        if ($this->container->get('request')->isXmlHttpRequest())
> > > >>        {
> > > >>            // do stuff and return ajax content
> > > >>        }
>
> > > >>        // return normal response
> > > >>     }
>
> > > >> On Apr 13, 5:16 am, symfonyMan <ezziani.cha...@gmail.com> wrote:
> > > >> > hello,
>
> > > >> > could somebody show me an example using ajax in symfony 2 ??
>
> > > >> > thanks
>
> > > >> --
> > > >> If you want to report a vulnerability issue on symfony, please send it
> > to
> > > >> security at symfony-project.com
>
> > > >> 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
>
> > --
> > If you want to report a vulnerability issue on symfony, please send it to
> > security at symfony-project.com
>
> > 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

-- 
If you want to report a vulnerability issue on symfony, please send it to 
security at symfony-project.com

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