Re: [web2py] Re: Ajax query

2010-03-03 Thread Thadeus Burgess
Just append to the title of the post [SOLVED] Glad you fixed it! -Thadeus On Wed, Mar 3, 2010 at 5:39 AM, LB22 wrote: > I don't actually know how to mark this as solved, but please consider > it so. > > On Mar 3, 10:25 am, LB22 wrote: >> OK, Thadeus was right on the money with regard to my

[web2py] Re: Ajax query

2010-03-03 Thread LB22
I don't actually know how to mark this as solved, but please consider it so. On Mar 3, 10:25 am, LB22 wrote: > OK, Thadeus was right on the money with regard to my problem. > > I don't know how I overlooked it, but I had a line of "legacy code" in > my function that requested the refering page. T

[web2py] Re: Ajax query

2010-03-03 Thread LB22
OK, Thadeus was right on the money with regard to my problem. I don't know how I overlooked it, but I had a line of "legacy code" in my function that requested the refering page. This is what was being returned in the ajax callback. As soon as I removed that line, I no longer had the problem with

[web2py] Re: Ajax query

2010-03-02 Thread mdipierro
You may not be calling vote_yay. Try replace ajax('vote_yay', ['sreq_id'],'sreq{{=sreq.id}}'); with ajax('{{=URL(r=request,f='vote_yay')}}', ['sreq_id'],'sreq{{=sreq.id}}'); On Mar 2, 7:07 pm, minh wrote: > I'm basically just having problems that Thadeus seemed to have > described above. > > I

[web2py] Re: Ajax query

2010-03-02 Thread mr.freeze
I can't reproduce this. Can you send me a test case to nathan at freezable dot com ? On Mar 2, 7:47 pm, minh wrote: > def vote_yay(): >    return '10' #testing purposes > > On Mar 2, 5:28 pm, "mr.freeze" wrote: > > > Can we see vote_yay? > > > On Mar 2, 7:07 pm, minh wrote: > > > > I'm basicall

[web2py] Re: Ajax query

2010-03-02 Thread minh
def vote_yay(): return '10' #testing purposes On Mar 2, 5:28 pm, "mr.freeze" wrote: > Can we see vote_yay? > > On Mar 2, 7:07 pm, minh wrote: > > > I'm basically just having problems that Thadeus seemed to have > > described above. > > > I'm trying to use the ajax() function but it seems li

[web2py] Re: Ajax query

2010-03-02 Thread mr.freeze
Can we see vote_yay? On Mar 2, 7:07 pm, minh wrote: > I'm basically just having problems that Thadeus seemed to have > described above. > > I'm trying to use the ajax() function but it seems like an entire page > is being fed into the target rather than a string I'm returning. > > This is in my v

[web2py] Re: Ajax query

2010-03-02 Thread minh
I'm basically just having problems that Thadeus seemed to have described above. I'm trying to use the ajax() function but it seems like an entire page is being fed into the target rather than a string I'm returning. This is in my view, Votes received: {{=votes_received}} [Vote Yay] The functio

[web2py] Re: Ajax query

2010-03-02 Thread mdipierro
I do not even remember what is in the manual. Plugins are the future... even if they may change. On Mar 2, 5:19 pm, minh wrote: > Should I disregard the example in the manual or is there a simple > tweak I can do to get it working. > > The plugin you mentioned seems a little more involved... don'

[web2py] Re: Ajax query

2010-03-02 Thread minh
Should I disregard the example in the manual or is there a simple tweak I can do to get it working. The plugin you mentioned seems a little more involved... don't want to get into it if there's an easy fix for the former method. On Mar 2, 2:42 pm, mdipierro wrote: > The manual is old in this res

[web2py] Re: Ajax query

2010-03-02 Thread mdipierro
The manual is old in this respect. I assume you have seen this: http://web2py.com/plugins/default/rating On Mar 2, 4:36 pm, minh wrote: > I'm trying to implement the voting/rating example from the manual and > I'm getting a similar issue with the page overlapping. > > On Mar 2, 2:26 pm, LB22 wro

[web2py] Re: Ajax query

2010-03-02 Thread minh
I'm trying to implement the voting/rating example from the manual and I'm getting a similar issue with the page overlapping. On Mar 2, 2:26 pm, LB22 wrote: > Hi Thadeus, > > Thanks for your input. Perhaps you could provide a couple of examples, > as I'm a little confused. > > In my example, I int

[web2py] Re: Ajax query

2010-03-02 Thread LB22
Hi Thadeus, Thanks for your input. Perhaps you could provide a couple of examples, as I'm a little confused. In my example, I intended the function 'mark' to only return this: DIV(IMG(_src=URL(r=request,c='static',f='icons/ star.png'),_class='icons',_title='Remove from favourites',_alt='Remove f

Re: [web2py] Re: Ajax query

2010-03-02 Thread Thadeus Burgess
You are returning a view that contains {{extend "layout.html"}} when you return the ajax, so since your returning the entire page html... you insert the page over again :) You can A) Return a view that does not extend layout B) Return a string that represents the html instead of a dict C) Call it

[web2py] Re: Ajax query

2010-03-02 Thread LB22
OK, so I tried upgrading, but still the same result I'm afraid. I figured I must be doing something wrong. Is there another method I could try to acheive the same result? Or do you know what I might be doing wrong? I'm just trying to mark something (by inserting a record into my db), and replace t

[web2py] Re: Ajax query

2010-03-02 Thread LB22
Hmm...no I'm actually using 1.75.4. I'll try upgrading and report back what happens. On 2 Mar, 19:24, mdipierro wrote: > Are you using the latest web2py? > > On Mar 2, 11:57 am, LB22 wrote: > > > > > Hi there, > > > I'm having a small problem and am not sure where I'm going wrong. I'm > > famila

[web2py] Re: Ajax query

2010-03-02 Thread mdipierro
Are you using the latest web2py? On Mar 2, 11:57 am, LB22 wrote: > Hi there, > > I'm having a small problem and am not sure where I'm going wrong. I'm > familar with javascript and have used query for some basic stuff, but > this is the first time I've tried to incorporate any ajax. > > I have in