Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
Nice :) -- Thadeus On Sat, May 15, 2010 at 10:50 PM, MikeEllis wrote: > Done.  See http://www.web2pyslices.com/main/slices/take_slice/79 > > On May 15, 8:44 pm, Thadeus Burgess wrote: >> Would you make a web2pyslice of this with some screenshots? Looks like >> great work. >> >> -- >> Thadeus

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
Done. See http://www.web2pyslices.com/main/slices/take_slice/79 On May 15, 8:44 pm, Thadeus Burgess wrote: > Would you make a web2pyslice of this with some screenshots? Looks like > great work. > > -- > Thadeus > > On Sat, May 15, 2010 at 5:09 PM, MikeEllis wrote: > > Thanks, Thaddeus.  That's

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
Would you make a web2pyslice of this with some screenshots? Looks like great work. -- Thadeus On Sat, May 15, 2010 at 5:09 PM, MikeEllis wrote: > Thanks, Thaddeus.  That's a good suggestion. It turns out my case can > be simplified considerably by using explicit id's for the sparklines, > e.

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
Thanks, Thaddeus. That's a good suggestion. It turns out my case can be simplified considerably by using explicit id's for the sparklines, e.g. $(function() { $(this).everyTime(1000,function(i) { $.getJSON('/peertool/sparkline/call/json/sparkdata/ 13/0/20', function(data)

Re: [web2py] Re: rpc from jquery

2010-05-15 Thread Thadeus Burgess
For multiple elements you might want to try and put it into a jQuery plugin, allowing you to re-use the code for each sparkline. $(".spark").makeSparkline({url:/path/to/call/sparkdata, args:etc}); -- Thadeus On Sat, May 15, 2010 at 1:34 PM, MikeEllis wrote: > > After spending some time with

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
After spending some time with Firebug to find and fix a couple of typos, I've got it working now. There seems to be no way around explicitly referring to the SPAN element (see below), but I can live with that. Now I need to tackle the next level, which is to expand the server- side JSON function

[web2py] Re: rpc from jquery

2010-05-15 Thread MikeEllis
After spending some time with Firebug to find and fix a couple of typos, I've got it working now. There seems to be no way around explicitly referring to the SPAN element (see below), but I can live with that. Now I need to tackle the next level, which is to expand the server- side JSON function

[web2py] Re: rpc from jquery

2010-05-14 Thread mdipierro
aha try replace $(function() { $('.dynamicsparkline').everyTime(1000,function(i) { $.getJSON('{{=URL(r=request,f='call/json/ datapoints')}}/'+i, function(data) { var b = [0,0,0,0,0,0,0] var j = 2+i%5; for(var k=0; k

[web2py] Re: rpc from jquery

2010-05-14 Thread MikeEllis
Thanks, Massimo! I've said it before, but it's certainly worth repeating. You are running the most responsive and helpful group on the web. So I've almost got it working with your suggestion, but I'm running into what seems to be an issue with javascript's scoping rules. My service function is

[web2py] Re: rpc from jquery

2010-05-14 Thread mdipierro
Try this: replace $(function() { $('.dynamicsparkline').everyTime(1000,function(i) { var a = [10,9,8,7,6,5,4]; var b = [0,0,0,0,0,0,0] var j = 2+i%5; for(var k=0; k wrote: > Hi, > I'm trying to create an application that displays live spa