Now I have tried: {{extend 'layout.html'}} <form> <input name="name" onkeyup="ajax('echo',['name'], 'target')" /> </form> <div id="target"></div>
Sorry, same result: "None" echo is called, but request.vars does not contain any value. Martin 2011/8/16 Massimo Di Pierro <massimo.dipie...@gmail.com> Try > > <input name="name" onkeyup="ajax('echo',['name'], 'target')" /> > > I think this is typo in the book. > > On Aug 16, 6:53 am, Martin Weissenboeck <mweis...@gmail.com> wrote: > > Hi, > > > > I have tried the example from chapter 10.3 The ajax Function > > > > Controller: > > def one(): > > return dict() > > > > def echo(): > > return request.vars.name > > > > one.html: > > {{extend 'layout.html'}} > > <form> > > <input id="name" onkeyup="ajax('echo',['name'], 'target')" /> > > </form> > > <div id="target"></div> > > > > No success, because the value of request.vars.name is None > > Just for fun I have tried "request.now", "request.extension", > > "request.folder" and so on instead of "request.vars.name" - these > examples > > worked fine, but I had no chance to get the value of name. > > > > Version: web2py 1.98.2, started from source with Windows Python 2.7.2 > > and web2py 1.98.2 Python 2.5 > > > > What is wrong - any ideas? > > > > Regards, Martin >