Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8064659
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T11:26:13+00:00 2026-06-05T11:26:13+00:00

I am trying to duplicate this functionality: http://datatables.net/release-datatables/examples/api/row_details.html The example provides this function: /*

  • 0

I am trying to duplicate this functionality: http://datatables.net/release-datatables/examples/api/row_details.html

The example provides this function:

/* Formating 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 have changed this function to be like so:

/* Formating function for row details */
function fnFormatDetails(oTable, nTr) {
    var aData = oTable.fnGetData(nTr);
    var sOut = jQuery.ajax({
        url: "ajax/order_history_orderlines.asp",
        type: 'post',
        data: { orderid: aData[1] },
        context: document.body
    });

    return sOut;
}

When debugging this through FireBug, I see the ajax response does everything correctly. The request is made, it succeeds, the correct information is being returned. Here is what is being returned:

<!-- Teplate for orderlines found in rs Record Set -->
<table cellpadding="5" cellspacing="0" border="0" style="padding-left: 50px;">

    <tr>
        <td>
            Quantity:
        </td>
        <td>
            1
        </td>
        <td>
            Description:
        </td>
        <td>
            48 Cans of drink
        </td>

        </tr>

</table>

However when I click the [+] button it expands the row, but the ‘details’ row never gets updated with the table that is returned from the ajax request.

When I use everything from the example and sOut = <table> etc it works. When I switch it to grab the ajax request it stop working with 0 errors.

Can anyone see what I am missing here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T11:26:15+00:00Added an answer on June 5, 2026 at 11:26 am

    Your code here is incorrect:

    var sOut = jQuery.ajax({
        url: "ajax/order_history_orderlines.asp",
        type: 'post',
        data: { orderid: aData[1] },
        context: document.body
    });
    

    jQuery.ajax() does not return data, it return the jqXHR object. You need to use the success callback functionality to populate data on a successful ajax call.

    var sOut = jQuery.ajax({
        url: "ajax/order_history_orderlines.asp",
        type: 'post',
        data: { orderid: aData[1] },
        context: document.body,
        success: function(data, textStatus, jqXHR)
        {
          // do something with data(json object returned by call)
        }
    });
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to duplicate this, http://jqueryui.com/demos/autocomplete/#remote-jsonp . Only, instead of querying the geonames.org server
Possible Duplicate: preg_match() Unknown modifier '[' help I am trying to match this pattern
I am trying to remove duplicates in my listview. This function: procedure RemoveDuplicates(const LV:TbsSkinListView);
So I'm working with authlogic, and I'm trying to duplicate the login functionality to
I am trying to duplicate the functionality that is currently implemented in VB. What
Apologize if this is duplicate - not sure how to word what Im trying
I'm trying to duplicate this type of mouse trail. I can't tell if it's
I'm trying to understand this bit of code: in display.php: <html> ... <body> <table>
I'm trying to duplicate the Overflow Menu dropdown functionality for other ActionBar items. I'm
Possible Duplicate: Is this possible in C++? toString(ClassName* class) I'm trying to use toString

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.