Dynamically Display ColumName
Dynamically Display ColumName
ramkrishna
Posts: 4Questions: 0Answers: 0
i want to load column names from the server, using DataTables or is there any other way to get it done ...do give me some code to display colunName and Data........I got stuck from 2 week now to do this
This discussion has been closed.
Replies
In my ready function
[code]
var tableSource = ;
$("#htmltable").load(tableSource, function(){ };
[/code]
in body of document,
I put this where I want the table displayed
[code][/code]
then i have a servlet referenced by
that returns something like this:
[code]
Due Date
Item #
Order Qty
Loading data from server
[/code]
Which my servlet could replace the headers, or in my case, the url changes so I hit different servlets for different headers and data.
I load the data via another url (or more precisely using the same url but with different parameters for output I want)
I suppose you could put the data in that table at the same time, but I prefer to setup the datatable to load its data dynamically more often via a json array, without necessarily hitting the server for the headers each time.