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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T21:59:46+00:00 2026-06-10T21:59:46+00:00

If in content.php I do not fill the table with the data, then I

  • 0

If in content.php I do not fill the table with the data, then I can see properly formatted jquery data table. However, if I fill it with the data (I tried both DB data and manual input of some random numbers), it is not formatted anymore and looks like a hell. Could it happen that $.get(..) (used in test.php) does not work properly in this example?

test.php

    $(document).ready(function() {
        loadContent();
    });

    function loadContent() {
                            $.get('modules/mod_scheduler/content.php', function(data) {
                                $('#table').html(data);
                            });     
    }

<div id="table"></div>

content.php

<?php
    include_once '../../include/connect_db.php';

    $query = "SELECT * FROM `TestTable`";
    $result=execute_query($query);

?>



    <table id="newspaper-b" border="0" cellspacing="2" cellpadding="2" width = "100%">
                        <thead>
                            <tr>
                                <th scope="col">Flight Num</th>
                                <th scope="col">Appearance Time</th>
                                <th scope="col">Target Time</th>
                                <th scope="col"></th>
                            </tr>
                        </thead>
                        <tbody>
                            <?php while($row=mysql_fetch_assoc($result)) {
                                        $flightNum=$row['flightNum'];
                                        $appearanceTime=$row['appearanceTime'];
                                        $targetTime=$row['targetTime'];
                            ?>
                            <tr>
                                <td><?php echo $flightNum; ?></td>
                                <td>

                                        <?php echo $appearanceTime;?>

                                </td>
                                <td>

                                        <?php echo $targetTime;?>

                                </td>

                                <td id="<?php echo $flightNum; ?>">
                                    <div>
                                        <img src='modules/images/edit.png' alt='Edit' />
                                    </div>
                                </td>
                            </tr>
                            <?php }?>
                        </tbody>
    </table>

Of course, I have also defined the following:

<link type="text/css" rel="stylesheet" href="modules/mod_scheduler/css/demo_table.css"/>
<link type="text/css" rel="stylesheet" href="modules/mod_scheduler/css/demo_page.css"/>
<link type="text/css" rel="stylesheet" href="modules/mod_scheduler/css/demo_table_jui.css"/>

<script type="text/javascript" src="modules/mod_scheduler/js/dataTable/jquery-ui.js"></script>
<script type="text/javascript" src="modules/mod_scheduler/js/dataTable/jquery.dataTables.js"></script>

<script language="javascript" type="text/javascript" src="modules/mod_scheduler/js/jqplot/plugins/jqplot.pointLabels.js"></script>
  • 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-10T21:59:48+00:00Added an answer on June 10, 2026 at 9:59 pm

    You are returning a table, but you are not calling dataTable() on it that I can see. The way the DataTables plugin works, you typically call the dataTable() on a table. I can’t recall what should happen with “arbitrary” style sheets (whatever styles you’ve set for the table), but certainly if you’re using jQuery UI (which it looks like you are), it won’t look right until you call the function, thereby adding all the necessary classes for jQuery UI theme. You could return those classes already in the table, but currently you are not.

    Since you are doing this server-side, I would take it a step further and return JSON-formatted data for the table instead of a whole bunch of table markup. That’s the more elegant and manageable way of using DataTables.

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

Sidebar

Related Questions

page.xml.php will not show any output, in firebug I can see the get response
want to rewrite urls like site.com/software to wp-content/themes/dir/software.php and something is not working.. Here's
I have the following scenario jQuery('#content').fadeOut('slow',function(){ jQuery('#content').load(detail.php?product=+imgID+&category=+cat); jQuery('#content').fadeIn('fast'); }); My problem however is that
I'm loading some content (NOT THE HTML headers or anything, just HTML formatted content
example can be found at: http://projects.snowshtechnologies.com/findhrr/_admin/_geolocate/content.php view the source for the full idea. I
I have been working on this form for my php class. I can not
The following codes works without jquery. I insert data but it does not update
I have a web form that users can fill out and that content fills
I have index.php and use jQuery .load() to load content from load.php. When I
the class, which is content.php class content { private $vars = array(); public function

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.