[web2py] Re: The Ajax function question

2013-09-18 Thread Avi A
I tried the first method (categories.load) and it works nice. Just there are a couple of issues: This line below when it rendered as ajax content: (inside categories.load) lih3a href={{=URL('default', 'index', args=(item.id))}}{{=item.f_item_name}}/a/h3/li First, It doesn't generate the h3 style

[web2py] Re: The Ajax function question

2013-09-14 Thread Avi A
Or should I use: http://api.jquery.com/load/ Thanks. On Saturday, September 14, 2013 11:58:33 PM UTC+3, Avi A wrote: Hi, This is my link on the index page: {{extend 'layout.html'}} div id=ajax_target . a href=# onclick=ajax('{{=URL('default', 'categories', args=(

[web2py] Re: The Ajax function question

2013-09-14 Thread Anthony
The ajax() function documentation is here: http://web2py.com/books/default/chapter/29/11/jquery-and-ajax#The-ajax-function . Note, the second argument does not do what you think it does. It should be an array of input element names (not div id's) that are on the current page (not on the page

[web2py] Re: The Ajax function question

2013-09-14 Thread Avi A
Second option works, but what do you mean by that particular view will not be compileable? On Saturday, September 14, 2013 11:58:33 PM UTC+3, Avi A wrote: Hi, This is my link on the index page: {{extend 'layout.html'}} div id=ajax_target . a href=# onclick=ajax('{{=URL('default',

[web2py] Re: The Ajax function question

2013-09-14 Thread Anthony
If you put the following line in a view: {{extend 'layout.html' if not request.ajax else None}} that view will not compile if you elect to compile the application (compiling is an option in the admin app). Compiling an app is optional, but it does speed up execution. So, the above method will

[web2py] Re: The Ajax function question

2013-09-14 Thread Avi A
Thanks. On Sunday, September 15, 2013 1:31:17 AM UTC+3, Anthony wrote: If you put the following line in a view: {{extend 'layout.html' if not request.ajax else None}} that view will not compile if you elect to compile the application (compiling is an option in the admin app). Compiling an