Hello,
I am trying to make the echo example work which is in the online book.
It works fine in my index function, but it doesn't work in any other function.
I use the same callback method in both views:
def echo():
return request.vars.keyword
and the methods (one is index, the other is called storeadmin) have identical code and views as well:
def index(): #as well as def: storeadmin():
return dict(
form = FORM (
INPUT(
_name='keyword',
_onkeyup="ajax('echo', ['keyword'], 'target');"
)
),
target_div=DIV(_id='target'))
the view is:
{{extend 'layout.html'}}
{{=form}}
<br />
{{=target_div}}
In index, the ajax call works as it should, but in storeadmin, I get the entire page pasted into the target div.
I put 2 screenshots of the pages for both methods to make it more clear.
do you have any idea why this could be?