The reason there isn't much information about this on the net is
because from server-side's standpoint, there is not much difference
between a plain POST/GET call and one made using AJAX. The only
difference is that most (but not all) JavaScript frameworks set the
X-REQUESTED-WITH header.
So, you don't need to look at how to handle requests with web.py, but
how to make them using your brand of JavaScript framework. The only
thing you may want to do server-side is to differentiate between an
AJAX call and a regular one, by checking if X-REQUESTED-WITH is
present. It's this code:
web.ctx.env.get('HTTP_X_REQUESTED_WITH')
Another thing, which is not AJAX-specific, but nevertheless might be
useful is the use of json library:
http://docs.python.org/library/json.html
Other than that, you code pretty much as usual.
On Wed, Jan 12, 2011 at 6:51 PM, Smartboy <[email protected]> wrote:
> Hello,
>
> Yes, I'm another user trying to use ajax and webpy together. I probably am
> not understanding what I'm doing, but there isn't a lot of information about
> this on the web. So, could anyone tell me why I do not get a login form when
> I click on login? I
>
> Thanks,
> Smartboy
>
> --
> You received this message because you are subscribed to the Google Groups
> "web.py" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/webpy?hl=en.
>
>
--
Branko Vukelic
[email protected]
http://www.brankovukelic.com/
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.