Hi,

There seems to be an issue with submission AJAX data in form.

Remove welcome and example applications first and make a new app
called init.

Again I was using this example:

default.py
-------------------------
def index():
    response.subtitle = ''
    return dict(form=FORM('username', INPUT(_id='keyword',
                                           _onkeyup="ajax('get_info',
['keyword'], 'target');")),
                target_div=DIV(_id='target')

def get_info():
    print(request.vars.keyword)
    pattern = '%'+ request.vars.keyword + '%'
    pages = db(db.members.username.like(pattern)).select()
    items = [A(row.username, _href=URL(r=request, f=index,
args=row.id)) for row in pages]
    return UL(*items).xml()

index.html
----------------------------
{{extend 'layout.html'}}
{{=form}}<br />{{=target_div}}

now if you visit http://localhost:8000 it never works.
but if you visit http://localhost:8000/init/default/index it does.

Is it a bug?

Cheers,
Zhe

Reply via email to