try this

def page1():
     form=SQLFORM.factory(Field('test'))
     if form.accepts(request.vars): pass
     return dict(form=form)

def page2():
     return "alert('%')" % repr(request.vars).replace('\'','"')

and a views/default/page1.html

{{extend 'layout.html'}}
{{=form}}
<script>
$(document).ready(function(){
   $('#no_table_test').keyup(function(){ajax('{{=URL
(r=request,f='page2')}}',['no_table_test'],':eval');});
});
</script>

everytime you press something in the INPUT field with
id=='no_table_test' generate by the form, it calls page2 on the server
and passes what is in the server in request.vars. page2 sends back an
instruction to the client "alert(....)" so that the client can take an
action decided by the server but triggered by an event on the client.

On Sep 12, 6:16 pm, Ankit Agarwal <[email protected]> wrote:
> I don't have any idea as to how use ajax . Is there any other way I
> can go about it ?
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"web2py-users" 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