View Full Version : table sorting doesnt work in firefox

09-12-2007, 09:07 PM
i have a table sorting feature on my website that works everywhere else except firefox. but the example code does work in firefox. this has me stumped.

The problem is the links in the table headers wont show up so they can be clicked on to sort the colunm. I dont think its the actual javascript file because as soon as I take out the string with the table data that is being populated from the databsase and use the example table it works.

Is there something in my html code that firefox doesnt support???
can someone check this out? any help is gladly appreciatted?

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><head>
<title>Product Inventory</title>
<link rel="stylesheet" href="style.css" type="text/css" />
<script type='text/javascript' src='common.js'></script>
<script type='text/javascript' src='css.js'></script>
<script type='text/javascript' src='standardista-table-sorting.js'></script>
//connect to database

//checks if category is selected or submitted
if (!isset($_POST['submit'])||(($_POST['select']) == 'All categories')){

//get all data from table
$sql = "SELECT * from products";
$result = @mysqli_query($mysqli, $sql) or die(mysqli_error($mysqli));


//get selected data of records
$get_list_sql = "SELECT * FROM products WHERE Category = '".$_POST['select']."'";
$result = mysqli_query($mysqli, $get_list_sql) or die(mysqli_error($mysqli));
$display_block = "<p align = 'center'> <table class='sortable' border = '1' bordercolor = 'black' cellpadding= '0' cellspacing = '0'>
<th bgcolor = 'orange'>Item Number</th>
<th bgcolor = 'orange'>Manufacturer</th>
<th bgcolor = 'orange'>Category</th>
<th bgcolor = 'orange'>Description</th>
<th bgcolor = 'orange'>Model</th>
<th bgcolor = 'orange'>Quantity</th>
<th bgcolor = 'orange'>Kw</th>
<th bgcolor = 'orange'>Hours</th>
<th bgcolor = 'orange'>Price</th>
//if authorized, get the values
while ($info = mysqli_fetch_array($result)) {

//create display string
$display_block .= "
$display_block .= "</table></p>";

09-12-2007, 11:22 PM
Hi there. Please don't crosspost (http://codingforums.com/showthread.php?t=123547), it's against the forum Rules (http://www.codingforums.com/rules.htm).