Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New to the CF scene
    Join Date
    Sep 2007
    Posts
    7
    Thanks
    1
    Thanked 0 Times in 0 Posts

    table sorting doesnt work in firefox

    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?

    Code:
    <!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>"; 
    ?>

  • #2
    Senior Coder
    Join Date
    Nov 2003
    Location
    Minneapolis, MN
    Posts
    2,879
    Thanks
    2
    Thanked 65 Times in 56 Posts
    Hi there. Please don't crosspost, it's against the forum Rules.

  • Users who have thanked rmedek for this post:

    cluce (09-13-2007)


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •