On Mon, Dec 14, 2009 at 12:58 PM, Miguel Lopes <mig.e.lo...@gmail.com> wrote:
> I'm posting this reluctantly, because I would expect to be doing
> something wrong. However I can't figure out what is wrong.
>
> Playing around with the CRM appliance I introduced a simple ajax
> search. Strangely the target div gets loaded with a copy of the entire
> page.
> My view is as simple as it could get (I didn't mess with layout.html):
> default/results.html
>
> {{extend 'layout.html'}}
>
> <h2>Results</h2>
> {{=search_input}} <br />
> {{=target_div}}
>
> The functions as well:
> @auth.requires_login()
> def list_results():
>    search_input=INPUT(_id='keyword', _onkeyup="ajax('bg_find',
> ['keyword'], 'target_div');")
>    target_div=DIV(_id='target_div')
>    return dict(search_input=search_input, target_div=target_div)
>
> @auth.requires_login()
> def bg_find():
>    return P('Hello')
>
> The problem shows both in Firefox and Safari.
> web2py Version 1.72.3 (2009-11-10 09:17:13)
>
> Txs,
> Miguel

I figured what is causing it! But have no idea why?
The problem only happens if the link is called with arguments!
for example:
(no problems): http://127.0.0.1:8000/crmappliance/default/list_results
(problems):
http://127.0.0.1:8000/crmappliance/default/list_results/company/1

What is wrong here?
Miguel

--

You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To post to this group, send email to web...@googlegroups.com.
To unsubscribe from this group, send email to 
web2py+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/web2py?hl=en.


Reply via email to