[web2py] Re: Updating contents of plugin_datatable via Ajax?

2010-02-04 Thread mdipierro
There is a js code that trigger datatable, something like jQuery('.table_class').dataTable();. You want the script to be executed AFTER the ajax content is retrieved. Web2py provides a mechanism for this: def data(): rows= db().select(db.statustable.ALL,orderby=db.statustable.createdon)

[web2py] Re: Updating contents of plugin_datatable via Ajax?

2010-02-04 Thread Stefan
Thanks for the response, Massimo. However! I can't seem to get the command to execute. I event tried including: response.headers['web2py-component-flash'] = Updated! but my after I make the Ajax call, I get a static table with no flash message. In default.py: def data(): rows=

[web2py] Re: Updating contents of plugin_datatable via Ajax?

2010-02-04 Thread mdipierro
Try something simpler: response.headers['web2py-component-command']=alert('hello world'); and make sure you have the web2py_ajx.html from the latest welcome app. On Feb 4, 10:13 am, Stefan stefan.louis.no...@gmail.com wrote: Thanks for the response, Massimo. However! I can't seem to get the

Re: [web2py] Re: Updating contents of plugin_datatable via Ajax?

2010-02-04 Thread Jonathan Lundell
Speaking of plugin_datatable, the example at http://www.web2py.com/plugins/default/datatable looks v. messed up via Safari and Firefox (I haven't tried anything else). Is that expected? I get something similar when I use it in my own app. FWIW, the CSS doesn't validate. (Among other things, //

[web2py] Re: Updating contents of plugin_datatable via Ajax?

2010-02-04 Thread Stefan
Hi Jonathan, I noticed the same thing. To fix it, you need to modify the CSS file: PluginsdatatableStatic filesplugin_datatable*.css Update it with the following configuration: .dataTables_wrapper { // position: relative; // min-height: 100px; // _height: 302px; // clear: both; float:

Re: [web2py] Re: Updating contents of plugin_datatable via Ajax?

2010-02-04 Thread Jonathan Lundell
On Feb 4, 2010, at 6:55 PM, Stefan wrote: Hi Jonathan, I noticed the same thing. To fix it, you need to modify the CSS file: PluginsdatatableStatic filesplugin_datatable*.css Update it with the following configuration: I ended up using dataTables directly, instead of the plugin, and