Hi, I need some help with plugin_jqgrid:
What I basicaly want to do is steady refreshing the grid with on loadComplete .trigger("reloadGrid"), how can i pass the var server_time with the url:'%(callback)s' to the controllers/ plugin_jqgrid/data call? I need this var in the controller to return data only if ther is new/ updated records(the var changes every loadComplete). _______________________________ models/plugin_jqgrid.py: callback = URL(r=request,c='plugin_jqgrid',f='data', vars=dict(tablename=table._tablename, columns=','.join(columns), fieldname=fieldname or '', fieldvalue=fieldvalue, )) script=""" var server_time=null; ... ... url:'%(callback)s', datatype: "json", ... loadComplete: function () { var server_time=$.getJSON("http:domain/app/default/time.html", time_callback); function time_callback(data) { var server_time=data; alert(server_time); }; setTimeout(function(){ jQuery("#%(id)s").jqGrid().setGridParam({datatype:"json"}); jQuery("#%(id)s").jqGrid().trigger("reloadGrid", [{current:true}]); }, 1000); /* 1000..after 1 seconds */ }, loadError: function () { setTimeout(function(){ jQuery("#%(id)s").jqGrid().setGridParam({datatype:"json"}); jQuery("#%(id)s").jqGrid().trigger("reloadGrid", [{current:true}]); }, 15000); /* milliseconds (15seconds) */ }, ... ... _______________________________ THX Dieter Asman