I want to test this idea, but it seems the events.tar does not contain that magic new web2py_ajax.html ? Did I miss something?
On Apr4, 2:02pm, mdipierro <[email protected]> wrote: > I re-posted a slightly better version. > > The new version work in this way: > > say you have an action like: > > def myform(): > form=SQLFORM(...) > if form.accepts(....): > # do something > redirect(URL(....)); > return dict(form=form) > > You can turn it into a partial by replacing "redirect" with > "jDiv.redirect or "jDiv.flash" > > def myform(): > form=SQLFORM(...) > if form.accepts(....): > # do something > jDiv.redirect("done!!!"); > return dict(form=form) > > and create a view that DOES NOT extend the layout and does not have > HTML and BODY tags. Something like this will do: > > {{=form}} > > Then create a parent action and in the view embed this partial > > {{=jDiv("click me to ajax the partial",URL(r=request,f="myform"))}} > > Mind that a partial can be served by another application (within the > same web2py installation), can be a proxy to a different web-site and > can contain an IFRAME (not recommended but possible). > > > On Apr 3, 4:08 pm, mdipierro <[email protected]> wrote: > > > > I have prototype application that does this. > > > > http://www.web2py.com/examples/static/web2py.app.events.tar > > > > It uses jquery publisher subscriber mechanism. All the code is in a > > > new web2py_ajax and a class call jDiv (similar to Rails Partial but > > > more powerful in my opinion) which I could include in html.py > --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "web2py Web Framework" 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/web2py?hl=en -~----------~----~----~----~------~----~------~--~---

