DataTables Help needed

132 views
Skip to first unread message

greenpoise

unread,
Apr 3, 2012, 6:41:44 PM4/3/12
to web...@googlegroups.com
hi there. I found this:

DataTables Filter Select

I want to add it to my web2py application. If I add the code to a static .js file and call it from my view, it does not work. However, if I embed the code within the layout, it partially works. What is the proper way to do this?? how can I accomplish the script to grab the values from a table??


thanks



Anthony

unread,
Apr 3, 2012, 9:32:23 PM4/3/12
to web...@googlegroups.com
DataTables Filter Select

I want to add it to my web2py application. If I add the code to a static .js file and call it from my view, it does not work. However, if I embed the code within the layout, it partially works. What is the proper way to do this?? how can I accomplish the script to grab the values from a table??

It should work from a js file -- are you loading the file after you have already loaded jQuery? What does "partially works" mean?

Anthony 

greenpoise

unread,
Apr 4, 2012, 12:50:33 PM4/4/12
to web...@googlegroups.com
Anthony,

I first get an error. Then the select dropdown picks the values with some additional characters and when I make a selection, it does not filter them (I am guessing because the additional characters that show up).

I am attaching some screenshots..hopefully they will show up


Thanks


dan
error.jpg
selection.jpg

Anthony

unread,
Apr 4, 2012, 4:24:35 PM4/4/12
to web...@googlegroups.com
Could be an issue with DataTables -- you might consider asking on their user forum.

Anthony

greenpoise

unread,
Apr 5, 2012, 5:05:39 PM4/5/12
to web...@googlegroups.com
Actually, it was a typo on my part...I did get it to work but now, working on 23,500 records and it takes so long to process..is that jquery??


 Thanks for the help...

Vineet

unread,
Apr 6, 2012, 4:14:21 AM4/6/12
to web...@googlegroups.com

Actually, it was a typo on my part...I did get it to work but now, working on 23,500 records and it takes so long to process..is that jquery??


With that much of data to load, your best bet would be AJAX.
dataTables plugin provides for loading data with server-side ajax function.

You might also look into infinite scrolling feature of dataTables.
In that, the data is rendered (DOM is manipulated) dynamically as you scroll.

You may visit their site & search for AJAX & infinite scroll.
I am using dataTables AJAX for my work.
If you need my code sample, do let me know on this list.

HTH

-- Vineet 

greenpoise

unread,
Apr 10, 2012, 3:31:38 PM4/10/12
to web...@googlegroups.com


With that much of data to load, your best bet would be AJAX.
dataTables plugin provides for loading data with server-side ajax function.

Nice to know. Did not know that. That just puts a roadblock on what I want to accomplish. I will search for Ajax though. Thanks



You may visit their site & search for AJAX & infinite scroll.
I am using dataTables AJAX for my work.
If you need my code sample, do let me know on this list.

I appreciate this. Thanks so much. Will let you know


Regards,

dan



HTH

-- Vineet 
Reply all
Reply to author
Forward
0 new messages