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 7937337
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T22:30:01+00:00 2026-06-03T22:30:01+00:00

I am trying to display a DataTable inside a Jquery Tab that is loaded

  • 0

I am trying to display a DataTable inside a Jquery Tab that is loaded through AJAX.
When I open the page in a browser it shows fine but in AJAX case it is a just displayed inside the tab as a pure table.
Is there something I am doing wrong or there is no possibility to do that?
Thank you for responses.

As requested, here is the code.
Loading libraries and CSS, convert unordered list to tabs

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="js/jquery-ui-1.8.18.custom.min.js"></script>
<link rel="stylesheet" type="text/css" href="js/ui-lightness/jquery-ui-1.8.18.custom.css" />
        <script>
        $(function() {
            $( "#tabs" ).tabs({
                ajaxOptions: {
                    error: function( xhr, status, index, anchor ) {
                        $( anchor.hash ).html(
                            "Some problem occured." +
                            "Probably the server is overloaded" );
                    }
                }
            });
        });
        </script>

Actual tabs

<div id="tabs">
        <ul>
             <li><a href="picklists.php?id=1"><span>Ready to be Picked</span></a></li>
             <li><a href="picklists.php?id=2"><span>Shipping Ready</span></a></li>
             <li><a href="picklists.php?id=3"><span>Picklists in Proforma</span></a></li>
             <li><a href="picklists.php?id=4"><span>Picklists in Invoice</span></a></li>
             <li><a href="picklists.php?id=5"><span>Picklists Shipped</span></a></li>
        </ul>
</div>

Then, picklist.php file that is loaded through AJAX. I will skip the code, just w=show the actual output

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
      <script src="js/jquery-ui-1.8.18.custom.min.js"></script>
      <link rel="stylesheet" type="text/css" href="js/ui-lightness/jquery-ui-1.8.18.custom.css" />
<table id="rows">
          <thead>
              <tr>
                  <td>
                  Invoice no.
                  </td>
                  <td>
                  Company
                  </td>
                  <td>
                  Items
                  </td>
                  <td>
                  Payment
                  </td>
              </tr>
          </thead>
          <tbody>
<tr>HERE COMES SOME INFORMATION</tr>
          </tbody>
      </table> <script language="JavaScript"> $(document).ready(function(){
 $('#rows').dataTable(); });
</script>

If I navigate to the page directly – it is fine. If I load it in a tab then it is just plain table

  • 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-03T22:30:03+00:00Added an answer on June 3, 2026 at 10:30 pm

    I found the solution and it was really simple.
    This is what I had to change in Tabs initialization

    $(function() {
                $( "#tabs" ).tabs({
                    ajaxOptions: {
                        error: function( xhr, status, index, anchor ) {
                            $( anchor.hash ).html(
                                "Some problem occured." +
                                "Probably the server is slow again." );
                        }
                    },
                    load: function(event, ui) {
    
                    },
                    select: function(event, ui)  {
                          $('#rows').remove();
                    }
                });
            });
    

    So basically two dataTables cannot exist and function on different tabs so in order to make everything work old dataTables instance should be destroyed

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Im trying to display some files in a web page so the user can
I'm trying to display a Hashmap in a DataTable, here's what i'm trying to
I'm trying to display two columns in a datatable(dt) into a datagrid. And add
I am trying to get my results to display inside of the loop but
I'm trying to display the REST call JSON response in jQuery datatables . Below
I am trying to get my application to display information that is in a
I'm trying to display the content of a datatable in my wpf datagrid In
I am trying to use jquery DataTables plugin to display details from my db
I am trying to use the YUI datatable to display data from a JSON
I'm trying to display the following JSON object using YUI DataTable. I was able

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.