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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T01:18:51+00:00 2026-06-11T01:18:51+00:00

Im using DataTables (datatables.net) to display my data but when i add the sDom

  • 0

Im using DataTables (datatables.net) to display my data but when i add the sDom element, no data are loaded to the table.

The below code works

<script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                $('#table_main').dataTable( {
                    "bProcessing": true,
                    "bServerSide": true,
                    "sAjaxSource": "<?php echo base_url()?>datatable.php"

                });

            });
        </script>

although the tags are created that are given in the sDom, none of the data is loaded from he source. and also the button style which are given i fnInitComplete are not being applied

<script type="text/javascript" charset="utf-8">
            $(document).ready(function() {
                $('#table_main').dataTable( {
                    "bProcessing": true,
                    "bServerSide": true,
                    "sAjaxSource": "<?php echo base_url()?>datatable.php",
                    "sDom": "<'dtTop'<'dtShowPer'l><'dtFilter'f>><'dtTables't><'dtBottom'<'dtInfo'i><'dtPagination'p>>",
                         "fnInitComplete": function(){
                                $(".dtShowPer select").uniform();
                                $(".dtFilter input").addClass("simple_field").css({
                                    "width": "auto",
                                    "margin-left": "15px"
                            });
                         }

                });

            });
    </script>

any help on how to fix this error will be appreciated.

  • 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-11T01:18:52+00:00Added an answer on June 11, 2026 at 1:18 am

    At first, documentation says nothing about subclass insertion, so try from working start point with such code (replace same line):

    "sDom": '<"dtShowPer"l><"dtFilter"f><"dtTables">rt<"dtBottom"><"dtInfo"i><"dtPagination"p>',
    

    I dont have any code example with data (but u can provide some on pastebin.com or else), and code seems correct. So just add one rule in sDom and add one-by-one after checking if it works fine.

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

Sidebar

Related Questions

Using a data table from http://datatables.net/ , How can i stop it from overflowing
I'm using DataTables ( datatables.net ) to display data from an Ajax source and
I'm using http://datatables.net/examples/ for easy control table. I'm generating table with more than 30,000
I am using datatables. ( http://datatables.net/ ) I have created a table. There is
I am using the JQuery Datatables plugin in an ASP.NET MVC project to display
I'm using DataTables plugin from http://datatables.net . The plugin it self is very useful,but
I am using http://datatables.net/ The demo table on their homepage resembles pretty much the
I am using jquery data tables server side method example here http://www.datatables.net/examples/server_side/server_side.html My JSON
I am using Datatables.net and I am running into an issue where they table
Using .Net and Oracle 11g - I've been returning dataTables from a procedure inside

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.