Thanks Brent, Eventually got it with your help and advice. The controller was failing silently (revealed with Firefox and Firebug). Once that was fixed, plugged the rest in and worked perfectly.
(kicking myself that it was so close, but you stuff really helped. I owe you one) Cheers, On Wednesday, 18 July 2012 09:55:36 UTC+10, Brent Zeiben wrote: > > Sorry Simon missed that the call wasn't working. > > Not sure what it could be. (Assuming jquery.js is loaded before the plugin > and you want the update function in app/default/update called) > > Attached is the test application I used, that is mainly your code above. > Just install it from web2py admin. On the home page of the app there is a > link to the probs test page, just under the "Hello World" message. > > On the test page you should be able to modify the values in the Fp column. > > > Give this a-go and see if the calls to the update() are working for you. > > I'm using 1.99.7 stable of web2py. > > Regards, > Brent > > On Tuesday, 17 July 2012 16:14:40 UTC-6, Simon Ashley wrote: >> >> Thanks Brent, >> >> Appreciate that, but the main issue is that the controller does not >> called from jQuery. i.e.S from this line >> >> jQuery('.EDit').editable("{{=URL('update')}}",{ >> >> There no post vars. >> (have also used a brute force updates to confirm that it doesn't fire) >> >> If we can only find out why. >> (thinking is a fundamental concept that I'm missing) >> >> Will give that another go today, but would be grateful for any hints. >> >> >> >> >> >> On Wednesday, 18 July 2012 02:25:43 UTC+10, Brent Zeiben wrote: >>> >>> >>> Going back to your first example code you gave above, >>> >>> Javascript in the view nothing really changed I just don't have the >>> indicator gif >>> <script> >>> jQuery(document).ready(function(){ >>> >>> jQuery('.EDit').editable("{{=URL('update')}}",{ >>> style: 'display:inline', >>> indicator: "Saving...", >>> tooltip : "Click to edit...", >>> style : "inherit" >>> }); >>> }); >>> >>> </script> >>> >>> >>> the update() function in the controller: >>> >>> def update(): >>> if request.post_vars: >>> idloc = request.post_vars.id >>> id,column = idloc.split('.') >>> value = request.post_vars.value >>> db(db.WSProb.id == id).update(**{column:value}) >>> return value >>> >>> >>> It seems jeditable submits its values through request.post_vars instead >>> of using request.args >>> I also modified the update clause so it would work with passing a column >>> name in as text. >>> I am using the source 1.7.1 version of jeditable from the >>> site<http://www.appelsiini.net/projects/jeditable>. >>> >>> >>> With minimal testing this seemed to allow you to update the numbers and >>> display the updated value. >>> >>> HTH, >>> Brent >>> >>> On Monday, 16 July 2012 20:11:39 UTC-6, Simon Ashley wrote: >>>> >>>> Thanks Brent, >>>> >>>> Sorry for the delay - first chance to delve into this again. Still no >>>> luck. Have tried various combinations but unable to get jeditable fire in >>>> this setup. >>>> Do you have a quick example that works (just a cut and paste one would >>>> do)? >>>> >>>> TIA. >>>> >>>> --