Thanks Brent,

Appreciate that, but the main issue is that the controller does not called 
from jQuery. i.e. 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.
>>
>>

-- 



Reply via email to