On Nov 25, 6:42 am, "mr.freeze" <
nat...@freezable.com> wrote:
> Send a var back with the ajax request:
>
> <a href="{{=URL('gym','default','get_workout')}}" onclick="ajax
> ('{{=URL
> (r=request,f='get_workout',vars=dict(is_ajax=True))}}', [],
> 'fitness_goals');return false;">
> {{=a.title}}</a>
>
> if request.vars.is_ajax:
> ....
>
> On Nov 24, 10:14 pm, Alex <
person...@gmail.com> wrote:
>
>
>
> > But how can controller method know if current request is POST / GET or
> > AJAX?
>
> > Sometimes it's needed to generate very different part of HTML page and
> > return it to update some DIV on the page.
>
> > On Nov 25, 6:09 am, Thadeus Burgess <
thade...@thadeusb.com> wrote:
>
> > > On your ajax calls use the .json
>
> > > so
>
> > >
http://mysite.com/init/default/index/fornormalpages
>