On Wed, Apr 1, 2009 at 8:59 PM, Steve Shephed <[email protected]> wrote:

>
> Just a note about the code Massimo supplied below.
>
> The class declaration should be changed to def if you are putting it
> in a controller like default.py


I don't know why you say that.  (I don't think it would work as a "def"
actually)

Just to remove the line-wrap issues, I've attached a working default.py
controller - make a new app, and use this default.py to demo it.


>
> Also the code has linewrapped so don't forget to append the 2 lines
> after button1 so that it works properly.
>
>
> mdipierro wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---

Attachment: default.py.gz
Description: GNU Zip compressed data

Reply via email to