...

View Full Version : table sorting doesnt work in firefox



cluce
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>
</head>
<?php
//connect to database
include'db.php';

//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));

}else{

//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'>
<thead>
<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>
</thead>";
//if authorized, get the values
while ($info = mysqli_fetch_array($result)) {

//create display string
$display_block .= "
<tr>
<td>".$info['Item_No']."</td>
<td>".$info['Manufacturer']."</td>
<td>".$info['Category']."</td>
<td>".$info['Description']."</td>
<td>".$info['Model']."</td>
<td>".$info['Qty']."</td>
<td>".$info['Kw']."</td>
<td>".$info['Hours']."</td>
<td>".$info['Price']."</td>
</tr>";
}
$display_block .= "</table></p>";
?>

rmedek
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).



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum