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

  • Home
  • SEARCH
  • 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 8969627
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 15, 20262026-06-15T17:37:10+00:00 2026-06-15T17:37:10+00:00

I’m trying to display a datatable within a Twitter bootstrap layout. When I run

  • 0

I’m trying to display a datatable within a Twitter bootstrap layout. When I run the same code, calling the same functions, it returns a datatable and displays it on the page as I’d expect. However, with I bring the same code into the TwitterBootstrap it doesn’t display it. Is there something different in the Twitterbootstrap that would stop it from displaying a table? Here’s my code:

 $('#TableHere').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' )
    $('#example').dataTable( {
     <%= returnWeeklyTable() %>

Then on the page which contains the call. The pie chart in the first half of the code is being displayed.

<form id="form1" runat="server">
    <div class="container-fluid">
        <asp:DropDownList ID="SelectComponent" runat="server">
        </asp:DropDownList>
        <div class="row-fluid">
        </div>
    </div>
    <div class="container-fluid">
        <div class="row-fluid">
            <a href="#pieChart" class="block-heading" data-toggle="collapse">Browser Usage</a>
            <div id="pieChart" class="block-body collapse in">
                <div>
                    <div id="container" style="min-width: 400px; height: 400px; margin: 0 auto">
                    </div>
                </div>
            </div>
        </div>
        <div class="row-fluid">
            <div class="row-fluid">
                <a href="#bTable" class="block-heading" data-toggle="collapse">Browser User Agent Table</a>
                <div id="bTable" class="block-body collapse in">
                    <div id="TableHere" runat="server">
                    </div>
                </div>
            </div>
        </div>
    </div>
</form>

When the page is executed, this is what shows up in the HTML portion:

<div id="TableHere">
    <table id="example" class="display" cellspacing="0" cellpadding="0" border="0"></table>
</div>

Here’s the javascript portion:

$('#demo').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>');
$('#example').dataTable({
    "aaData": [
        ['Internet Explorer', '8.0', '14038'],
        ['Andriod', '2.3.7', '20'],
        ['Safari', '4.1', '18'],
        ['BlackBerry Browser', 'Unknown', '16'],
        ['Safari', '4.0', '12'],
        ['Mobile Safari', '7.0', '10'],
        ['Chrome', '17.0', '6'],
        ['Firefox', '5.0', '4'],
        ['Firefox', '2.0', '2'],
        ['Opera', '12.10', '2']
    ],
    "aoColumns": [
        {"sTitle": "Browser Name"},
        {"sTitle": "Browser Version"},
        {"sTitle": "Total"}
    ]
});

So, the VB is executing, and executing correctly as far as I know? When I place the code into a jsBin example my javascript displays? So the only conclusion I can make is something in bootstrap is stopping it? Any ideas?

  • 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-15T17:37:11+00:00Added an answer on June 15, 2026 at 5:37 pm

    I do not think that your issue is stemming from the use of bootstrap and datatables. I made a jsbin to test it out and was able to get your code, simplified because it did not have asp, to execute without issues.

    http://jsbin.com/elixor/1/edit

    Below is the code I used.

    <script src="http://code.jquery.com/jquery.min.js"></script>
    <link href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css" rel="stylesheet" type="text/css" />
    <link href="http://twitter.github.com/bootstrap/assets/css/bootstrap-responsive.css" rel="stylesheet" type="text/css" />
    <script src="http://twitter.github.com/bootstrap/assets/js/bootstrap.js"></script>
    <link href="http://www.datatables.net/release-datatables/media/css/demo_table.css" rel="stylesheet" type="text/css">
    <script src="http://www.datatables.net/release-datatables/media/js/jquery.dataTables.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(document).ready
        (
                function ()
                {
                    $('#TableHere').html( '<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>' );
                    $('#demo').html('<table cellpadding="0" cellspacing="0" border="0" class="display" id="example"></table>');
                    $('#example').dataTable({
                        "aaData": [
                            ['Internet Explorer', '8.0', '14038'],
                            ['Andriod', '2.3.7', '20'],
                            ['Safari', '4.1', '18'],
                            ['BlackBerry Browser', 'Unknown', '16'],
                            ['Safari', '4.0', '12'],
                            ['Mobile Safari', '7.0', '10'],
                            ['Chrome', '17.0', '6'],
                            ['Firefox', '5.0', '4'],
                            ['Firefox', '2.0', '2'],
                            ['Opera', '12.10', '2']
                        ],
                        "aoColumns": [
                            {"sTitle": "Browser Name"},
                            {"sTitle": "Browser Version"},
                            {"sTitle": "Total"}
                        ]
                    });
    
                }
        );
    </script>
    <div class="container-fluid">
        <div class="row-fluid">
            <div class="row-fluid">
                <a href="#bTable" class="block-heading" data-toggle="collapse">Browser User Agent Table</a>
                <div id="bTable" class="block-body collapse in">
                    <div id="TableHere">
                    </div>
                </div>
            </div>
        </div>
    </div>
    

    Also just for your information I have successfully used Knockout to hide and display datatables if you are looking for that functionality.

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

Sidebar

Related Questions

I am trying to understand how to use SyndicationItem to display feed which is
I'm trying to convert HTML to plain text. I get many &\#8217; &\#8220; etc.
Basically, what I'm trying to create is a page of div tags, each has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
link Im having trouble converting the html entites into html characters, (&# 8217;) i
I am trying to render a haml file in a javascript response like so:
I have this code to decode numeric html entities to the UTF8 equivalent character.
In my XML file chapters tag has more chapter tag.i need to display chapters
I would like to run a str_replace or preg_replace which looks for certain words
I'm parsing an RSS feed that has an &#8217; in it. SimpleXML turns this

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.