I have a page that builds out a table. Nothing else on that page but the table that is filled from a query.
I need to call this page through jQuery/ajax and somehow have it returned into this function.
Here is the jQuery function that needs to call the page and supply the return from the page into the sOut variable.
I am using DataTables.
/* Formatting function for row details */
function fnFormatDetails(oTable, nTr) {
var aData = oTable.fnGetData(nTr);
var sOut = '<table cellpadding="5" cellspacing="0" border="0" style="padding-left:50px;">';
sOut += '<tr><td>Rendering engine:</td><td>' + aData[1] + ' ' + aData[4] + '</td></tr>';
sOut += '<tr><td>Link to source:</td><td>Could provide a link here</td></tr>';
sOut += '<tr><td>Extra info:</td><td>And any further details here (images etc)</td></tr>';
sOut += '</table>';
return sOut;
}
I need sOut to somehow be changed so it = the call to the ajax page.
The path to the ajax page is. "ajax/order_history_orderlines.asp"
The ajax page is expecting one parameter to be sent over and that is aData[1] which will supply the orderID.
Can anyone help me figure out how to make sOut grab the ajax page?
Better example of what I am trying to accomplish.
/* Formating function for row details */
function fnFormatDetails(oTable, nTr) {
var aData = oTable.fnGetData(nTr);
var sOut = 'ajax/order_history_orderlines.asp?orderid=' + aData[1];
return sOut;
}
With jQuery: