I think this does what you ask:

class index():
     button1=TAG.BUTTON(_onclick="$.ajax({url: '%s', success: function
(value) { $('#target').html(value); } });" % URL
(r=request,f='callback'))
     div1=DIV(_id='target')
     return dict(button1=button1, div1=div1)

class callback():
     return H1('Hello world').xml()



On Apr 1, 3:18 pm, Steve Shephed <[email protected]> wrote:
> Hi Anyone
> How do we implement (with a view type paradigm) a partial coding.
> In RoR you can setup divs that then are given a partial setting so
> that other divs in the view can update them.
> Also if you create a list of items through an iteration you may want
> to show() a div that loads content onclick()
> Rather than loading the whole page with the view and just hiding the
> bits you don't want.
> The loading of content onclick is so much quicker.
> Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to