Sorry, my mistake... It works! There has been a file "one.html" and another file "one.html.bak" The editor opens "one.html.bak" (why?), but web2py uses "one.html" (of course!)
Thnak you very much! 2011/8/16 Martin Weissenboeck <[email protected]> > 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 <[email protected]> > > 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 <[email protected]> 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 >> > > >

