Please let me know what is the issue with code. i just did basic zero configuration

Please let me know what is the issue with code. i just did basic zero configuration

srikkanthsikisrikkanthsiki Posts: 1Questions: 1Answers: 0
edited March 2015 in Free community support
<!DOCTYPE html>
<html>
<head>
    <title>FLEET Spreadsheet</title><!-- DataTables CSS -->

    
     <link href="//code.jquery.com/ui/1.11.2/themes/smoothness/jquery-ui.css"rel="stylesheet" type="text/css">
     <link href="//cdn.datatables.net/plug-ins/f2c75b7247b/integration/jqueryui/dataTables.jqueryui.css"rel="stylesheet" type="text/css">

    <script charset="utf8" src="https://code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><!-- DataTables -->
    <script charset="utf8" src="https://cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js"type="text/javascript"></script>
    <script charset="utf8" src="https://cdn.datatables.net/plug-ins/f2c75b7247b/integration/jqueryui/dataTables.jqueryui.js"type="text/javascript"></script>
       <!--<link href="//cdn.datatables.net/1.10.5/css/jquery.dataTables.css"rel="stylesheet" type="text/css"> jQuery --> 
   
    <style>
    div.container {
        width: 80%;
    }
    </style>

        <script charset="utf8" src="//code.jquery.com/jquery-1.11.1.min.js" type="text/javascript"></script><!-- DataTables -->
    <script charset="utf8" src="//cdn.datatables.net/1.10.5/js/jquery.dataTables.min.js"type="text/javascript"></script>
    <script charset="utf8" src="//cdn.datatables.net/plug-ins/f2c75b7247b/integration/jqueryui/dataTables.jqueryui.js"type="text/javascript"></script>
<script type="text/javascript">  
     $(document).ready(function () {  
         $("#example").dataTable();  });
 </script> 
    
</head>

<body>
    


    <table  id="example" class="display" >
        <thead>
           <tr>
                <th>DC</th>

                <th>Partition</th>

                <th>POD1</th>
    
                <th>POD2</th>

                <th>POD3</th>   

                <th>POD4</th>

                <th>POD5</th>

                <th>POD6</th>

                <th>POD7</th>

                <th>POD8</th>

                <th>POD9</th>

                <th>POD10</th>
            </tr>
        </thead>

        <tbody>
            <tr>
                <td>ST</td>

                <td>P01</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td>5</td>

                <td></td>
            </tr>
       

        
         
        </tbody>

        <tfoot>
            <tr>
                <th>DC</th>

                <th>Partition</th>

                <th>POD1</th>

                <th>POD2</th>

                <th>POD3</th>

                <th>POD4</th>

                <th>POD5</th>

                <th>POD6</th>

                <th>POD7</th>

                <th>POD8</th>

                <th>POD9</th>

                <th>POD10</th>
            </tr>
        </tfoot>
    </table>
   


</body>
</html>

Answers

  • mkleinoskymkleinosky Posts: 46Questions: 6Answers: 5

    add

    <

    div id="container"> above the table

  • allanallan Posts: 63,679Questions: 1Answers: 10,498 Site admin
    edited March 2015

    Your thead defines 12 columns, while the tbody defines 13. That is the error - they should be identical.

    Allan

This discussion has been closed.