css wont load but sql does
css wont load but sql does
Joebuddah
Posts: 7Questions: 1Answers: 0
I have both tried both jquery.dataTables with Demo_table.css and the jquery.min.js and css files neither one will load the css into the tables any idea? all the files are in the same directory as "index.php" which is the code displayed below.
<?php
$con=mysql_connect("localhost","wrchtnoy_user","zMziu*1V4MoL");
if(!con){
die("Error: ".mysql_error());
}
mysql_select_db("wrchtnoy_mysite",$con);
$result = mysql_query("SELECT * FROM comments");
?>
<html>
<title>data</title>
<script src="jquery.dataTables.min.js" type="text/javascript"></script>
<script src="jquery.dataTables.js" type="text/javascript"</script>
<style type="text/css">
@import "jquery.dataTables.min.css";
</style type="text/javascript" charset="utf-8">
<script>
$(document).ready(function(){
$('#comments').dataTables();
})
</script>
<body>
<div>
<table id="comments" class="display">
<thead>
<tr>
<th>id</th>
<th>name</th>
<th>email</th>
</tr>
</thead>
<tbody>
<?php
while($row = mysql_fetch_array($result)){
?>
<tr>
<td><?=$row['id']?></td>
<td><?=$row['name']?></td>
<td><?=$row['email']?></td>
</tr>
<?php
}
?>
</tbody>
</tbody>
</table>
</div>
</body>
</html>
This discussion has been closed.
Replies
I've no experience with @import but that doesn't look right. Check your usage with a reliable source.
That's the forum up to its own tricks... An
@
in a code block it tries to make into a link to a user name... I really must fix that!@Joebuddah - Can you link to the page please. I don't immediately see an issue with your code.
Allan
josephhahn.com/breaker/test/test
If you look at the console in your browser you will see something like:
That's because it is not. As all the documentation and examples on this site show it should be
$(...).dataTable()
that you are using - nos
.Allan
Thanks!!!!
I feel like Barry from Office Space. I always overlook something simple.
I didn't spot it, either. :-(