I was studying ajax function.
Exactly reproduced the code from web2py book.
=========default/one.html========
{{extend 'layout.html'}}
<form>
<input id="name" onkeypress="ajax('echo', ['name'], 'target')" />
</form>
<div id="target">
</div>
==========default.py===========
def one():
  return dict()

def echo():
  return request.vars.name
====================

After typing anything in the input box, "None" is displayed in the
target div.

Whether any correction is required in this code?

Thanks,
Vineet

Reply via email to