[web2py] Re: Example JSON Code

2013-02-28 Thread Paul Lozancich
Figured out error. Co-worker showed me I had the Python file in the wrong directory. I need to study Web2py and get a better undertstanding of it. Thanks for all the help! On Thursday, February 14, 2013 2:17:21 AM UTC-8, Alan Etkin wrote: > > How do you put that before the $.jsonp({ call? >>

[web2py] Re: Example JSON Code

2013-02-14 Thread Alan Etkin
> > How do you put that before the $.jsonp({ call? > {{=SCRIPT(...)}} You can also do string interpolation with one SCRIPT call SCRIPT(""" ... url: "%(url)s", """ % dict(url=URL(...))) -- --- You received this message because you are subscribed to the Goo

[web2py] Re: Example JSON Code

2013-02-13 Thread pal4rp
Alan, I've seen that kind of code before but used directly as a parameter in a jQuery.getJSON call. How do you put that before the $.jsonp({ call? On Wednesday, February 13, 2013 12:15:23 PM UTC-8, Alan Etkin wrote: > > Can't figure out how to form the URL. > > > Is the client script created

[web2py] Re: Example JSON Code

2013-02-13 Thread Alan Etkin
> > Can't figure out how to form the URL. Is the client script created by the same app that serves the data? In that case, you add this to the view: {{=SCRIPT('var getDaysURL="%s";' % URL(c="json_test", f="get_days"))}} And then use the getDaysURL string in your script. -- --- You rec

[web2py] Re: Example JSON Code

2013-02-13 Thread pal4rp
Can't figure out how to form the URL. My remote function is *get_days* in the file* json_test.py* in *Controllers* . My html is* databaselist.html* in the queries folder in *Views* The application is *amrat_dev.* Not sure how to put this all together. On Thursday, February 7, 2013 3:58:13 P

[web2py] Re: Example JSON Code

2013-02-07 Thread howesc
"get_days" is not a valid url. "/get_days" might be depending on your routing. for the purposes of getting things working you should put in the fully qualified URL like http://test.exmaple.com/app/json_test/get_days cfh On Thursday, February 7, 2013 2:12:34 PM UTC-8, pal...@gmail.com wrote:

[web2py] Re: Example JSON Code

2013-02-07 Thread pal4rp
> > Here's the top of the html file, the Javascript function and the Python > file. Started using the *jsonp-2.4.0.min.js* script because it appears to > handle errors better. I've just jumped into Web2py so I don't know if I'm > building the URL properly. > This returns: *errMsg =Uncaught Er

[web2py] Re: Example JSON Code

2013-02-06 Thread howesc
the URL that you *think* you are requesting via AJAX may not be the URL you are actually hitting. can you check which URL you are trying to make a request to via AJAX? (use the debugging tools included in firefox or chrome to see all network traffic) cfh On Monday, February 4, 2013 4:04:

[web2py] Re: Example JSON Code

2013-02-05 Thread Niphlod
yep On Tuesday, February 5, 2013 1:04:27 AM UTC+1, pal...@gmail.com wrote: > > niphold, what do you mean when you say opening directly the URL that fails? > > On Thursday, January 31, 2013 1:10:18 AM UTC-8, Niphlod wrote: >> >> did you try opening directly the url that is failing through ajax ? th

[web2py] Re: Example JSON Code

2013-02-04 Thread pal4rp
niphold, what do you mean when you say opening directly the URL that fails? On Thursday, January 31, 2013 1:10:18 AM UTC-8, Niphlod wrote: > > did you try opening directly the url that is failing through ajax ? that > 404 could be originated by an incorrect/mispelled url. > > On Thursday, January

[web2py] Re: Example JSON Code

2013-01-31 Thread Niphlod
did you try opening directly the url that is failing through ajax ? that 404 could be originated by an incorrect/mispelled url. On Thursday, January 31, 2013 12:36:56 AM UTC+1, pal...@gmail.com wrote: > > We just started using web2py where I work. We created our 1st webpage and > it uses JSON c