[web2py] Re: JQUERY as response in Ajax call?

2013-05-09 Thread Niphlod
if you're using components, use response.js . http://web2py.com/books/default/chapter/29/12?search=response.js On Friday, May 10, 2013 7:10:31 AM UTC+2, Mika Sjöman wrote: > > Hi > > I am trying to close a window title dialog with JQUERY after sucessuflly > updating a clients phone number. Th

[web2py] Re: JQUERY as response in Ajax call?

2013-05-10 Thread Mika Sjöman
Hi No I am not calling it from a component, but from a jQuery post when I submit a phone number from a post via ajax. Any ideas? On Friday, May 10, 2013 2:49:33 PM UTC+8, Niphlod wrote: > > if you're using components, use response.js . > http://web2py.com/books/default/chapter/29/12?search=

[web2py] Re: JQUERY as response in Ajax call?

2013-05-10 Thread Anthony
http://web2py.com/books/default/chapter/29/11#Eval-target On Friday, May 10, 2013 6:13:23 AM UTC-4, Mika Sjöman wrote: > > Hi > > No I am not calling it from a component, but from a jQuery post when I > submit a phone number from a post via ajax. > > Any ideas? > > On Friday, May 10, 2013 2:49:33

[web2py] Re: JQUERY as response in Ajax call?

2013-05-10 Thread Gergely Orosz
Hi Mika, Have you tried simply retunrning the jQuery string. I have some ajax calles in my projects and it is working fine for me. There are two difference I don't use: return false; when calling ajax and return the jQuery command not a variable I hope I could help Regargds Greg On Friday, 10

[web2py] Re: JQUERY as response in Ajax call?

2013-05-11 Thread Mika Sjöman
that one worked like a charm. Final solution became like this, where the submit buttons is kind of there just for looks since it will send onkeyUp. What I really like about it is that It reduces the JQuery to zero for my part to write which means less code to manage. -SOLUTION ---

[web2py] Re: JQUERY as response in Ajax call?

2013-05-11 Thread Mika Sjöman
I was just thinking, would it not be smarter to have a FORM helper with an ajax option? something like this: FORM(ajax=True, eval=True, target='targetdiv/object') To be honest almost half of my form posts are ajax now, so it feels wiered that I can not just choose if it is ajax when creating t

[web2py] Re: JQUERY as response in Ajax call?

2013-05-11 Thread Anthony
> > I was just thinking, would it not be smarter to have a FORM helper with an > ajax option? > something like this: > > FORM(ajax=True, eval=True, target='targetdiv/object') > It probably makes most sense to do an Ajax form when you've got multiple items on the page and don't want to refresh