On Thu, Jul 1, 2010 at 2:28 AM, Dave Schaefer <[email protected]> wrote:
> I am also wondering: does web.py only draw the web page when the GET
> or POST function finally returns? I see in some old mailing list
> discussions people call 'print render.foo()', but this does not appear
> to actually draw to the web page (unless I'm doing something wrong?).

``print`` doesn't work with newer web.py versions. You need to
``return`` instead.

What you're saying can be easily accomplished with some AJAX call and
replacing the HTML of the page using DOM manipulation. Most JavaScript
libraries (jQuery, for example) are very well equipped for this kind
of job.

Another way is to parameterize the template, and add state (like
progress="done" and progress="started") information as either session
variable or URL parameter. In fact, I'd do both AJAX and non-AJAX just
in case, and default to AJAX, use non-AJAX as backup in case someone
uses lynx or non-visual browser.

-- 
Branko Vukelić

[email protected]
[email protected]

Check out my blog: http://www.brankovukelic.com/
Check out my portfolio: http://www.flickr.com/photos/foxbunny/
Registered Linux user #438078 (http://counter.li.org/)
I hang out on identi.ca: http://identi.ca/foxbunny

Gimp Brushmakers Guild
http://bit.ly/gbg-group

-- 
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.

Reply via email to