Steve,
I know this is an old post, but i'm trying to implement something like this
(the classes). Where should I put the class index(): and how would I import
it? Would it go in the default.py?
On Sunday, April 5, 2009 6:03:26 AM UTC-4, Steve Shephed wrote:
>
> Where did you find the book in pdf format for under $20?
> You should look at the the following code that allows a callback without
> updating the page. This would be great for a calculator.
>
> 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()
>
>
--
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
---
You received this message because you are subscribed to the Google Groups
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.