[web2py] Re: problem with ajax search

2010-12-26 Thread VP
Massimo, It now works as a charm. Thank you so, so much for your help!!! On Dec 27, 12:07 am, mdipierro wrote: > Sorry, my mistake... > > def search(): >      "an ajax wiki search page" >      return dict(form=FORM(INPUT(_id='keyword',_name='keyword', >               _onkeyup="ajax('%s',['key

[web2py] Re: problem with ajax search

2010-12-26 Thread mdipierro
Sorry, my mistake... def search(): "an ajax wiki search page" return dict(form=FORM(INPUT(_id='keyword',_name='keyword', _onkeyup="ajax('%s',['keyword'],'target');" % URL('bg_find'))), target_div=DIV(_id='target')) On Dec 27, 12:03 am, VP wrote: > Just plu

[web2py] Re: problem with ajax search

2010-12-26 Thread VP
Just plug it in. Doesn't seem to work at all. def search(): "an ajax wiki search page" return dict(form=FORM(INPUT(_id='keyword',_name='keyword', _onkeyup="ajax('{{=URL('bg_find')}}', ['keyword'],'target');")), target_div=DIV(_id='target')) On Dec 26, 11:51

[web2py] Re: problem with ajax search

2010-12-26 Thread mdipierro
It is not a bug. The URL is incomplete ajax('{{=URL('add_issue_find')}}',['keyword'],'target');") On Dec 26, 11:35 pm, VP wrote: > I think it's likely that this is the same bug reported > byhttp://groups.google.com/group/web2py/browse_thread/thread/9707f3d66d... > > If true, it's interesting to

[web2py] Re: problem with ajax search

2010-12-26 Thread VP
I think it's likely that this is the same bug reported by http://groups.google.com/group/web2py/browse_thread/thread/9707f3d66d859893/5785831e673afd2b?lnk=gst&q=ajax+search#5785831e673afd2b If true, it's interesting to note that this bug has lived for almost 2 years; possibly more.

[web2py] Re: problem with ajax search

2010-12-26 Thread VP
I have been able to duplicate this error with latest version of web2py (1.91.4) and the exact wiki app in Chapter 3 of the book. To recap, if you use the ajax search recipe described in Chapter 3, you can not have a trailing slash (bug described above). This means no arguments are can be passed t

[web2py] Re: problem with ajax search

2010-12-25 Thread VP
Massimo, maybe I didn't write clearly. I don't think there's much more to explain. Essentially, I followed exactly the ajax search technique in Chapter 3 of the book. The view of search was the simplest (as shown above). The controller function for search was taken from the book. The ajax func

[web2py] Re: problem with ajax search

2010-12-25 Thread mdipierro
please explain more. On Dec 25, 12:07 pm, VP wrote: > of course, layout.html is web2py's base template, unmodified.  I think > this is a bug.

[web2py] Re: problem with ajax search

2010-12-25 Thread VP
of course, layout.html is web2py's base template, unmodified. I think this is a bug.

[web2py] Re: problem with ajax search

2010-12-25 Thread VP
I have reduced the view to this: {{ extend 'layout.html' }} Search: {{=search_form}} {{=target_div}} Here's search: def search(): return dict(search_form=FORM(INPUT(_id='keyword',_name='keyword', _onkeyup="ajax('bg_find', ['keyword'], 'target');")), target_div=DIV(_id='targe

[web2py] Re: problem with ajax search

2010-12-25 Thread mdipierro
The same answer as in that thread applies: I cannot tell without looking at the code. I suspect some {{=URL(...)}} is missing when specifying the action. On Dec 25, 3:09 am, VP wrote: > I am having the exact problem as > this:http://groups.google.com/group/web2py/browse_thread/thread/9707f3d66d.

[web2py] Re: problem with ajax search

2010-12-25 Thread VP
I am having the exact problem as this: http://groups.google.com/group/web2py/browse_thread/thread/9707f3d66d859893/5785831e673afd2b?lnk=gst&q=ajax+search#5785831e673afd2b Right now, i'm testing a simple search page, with nothing but the search form and div to display the result. http://mydomain.c