[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Leonel Câmara
It shouldn't be on href it should be on onclick. Consider using a trapped link for that instead. http://web2py.com/books/default/chapter/29/12/components-and-plugins#Trapped-Ajax-links-and-the-A-Helper -- Resources: - http://web2py.com - http://web2py.com/book (Documentation) - http://github.com

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
{{extend 'layout.html'}} {{for row in rows:}} {{=row.name}} check 'about' {{pass}} def index(): rows=db(db.groups.id>0).select() return locals() def about_group(): row=db(db.groups.id

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Anthony
On Tuesday, March 29, 2016 at 6:09:57 AM UTC-4, Jacob Devin wrote: > > view: > > {{extend 'layout.html'}} > {{for row in rows:}} > > {{=row.name}} > > > check > 'about' > Please review the documentation. The second argument to the ajax() function is a list of "name" attributes of form

[web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
Thank you Anthony. It worked flawlessly! On Tuesday, March 29, 2016 at 6:50:24 PM UTC+5:30, Anthony wrote: > > On Tuesday, March 29, 2016 at 6:09:57 AM UTC-4, Jacob Devin wrote: >> >> view: >> >> {{extend 'layout.html'}} >> {{for row in rows:}} >> >> {{=row.name}} >> >> >> check >> 'ab

Re: [web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Kiran Subbaraman
Escaping the inner-quotes: onclick="ajax('{{=URL(\'default\',\'about_group\')}}',[row.id ],'target');"> Also will be a good idea to see what sort of errors appear on your browser's console, and if the generated page contains the callback url that you expect. ___

Re: [web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Jacob Devin
now it says: unexpected character after line continuation character (default/index.html, line 83) earlier it was giving no response on clicking as i expected it to work as per its onclick function. On Tuesday, March 29, 2016 at 4:10:02 PM UTC+5:30, Kiran Subbaraman wrote: > > Escaping the inne

Re: [web2py] Re: Why is this ajax function not working fine?

2016-03-29 Thread Niphlod
a taddle bit of recap, seems that you're loosing the bigger picture ANYTHING (or, the 99%) of things in views contained in a {{=blabla}} are properly escaped. Back to the "problem": - first of all, you shouldn't generate multiple times. Every element with an id attribute should be the onl