Jump to content

jquery tablesorter on same page as sessions


dodgeitorelse

Recommended Posts

Hi I have jquery table sorter for one of my pages. It works fine..... until I start using some variables that are in session. Why does this stop the sort function from working?

 

code for sorter that works ....

<head>
  <title><?php echo "$server_name"; ?> Top Ten Scores</title>

<style type="text/css">
A:link {text-decoration: none; color: lime;}
A:visited {text-decoration: none; color: blue;}
A:active {text-decoration: none; color: white;}
A:hover {text-decoration: underline; color: lightgreen;}
</style>
  
  <script src="js/jquery.js" type="text/javascript"></script>
  <script src="js/jquery.dataTables.min.js" type="text/javascript"></script>
  
  <link href="css/table.css" rel="stylesheet" type="text/css" media="print, projection, screen" />
  <script type="text/javascript">
    $(document).ready(function ()
    {
      $("#tablesorter").dataTable({
        "bPaginate": false,
        "bAutoWidth": true,
	"aaSorting": [[ 0, "Asc" ]],
        "aoColumns": 
          [
	  
            { "bSortable": true }, // disable sorting of first column in table
            	null,
                null				
          ]
      })
    });
  </script>
</head>

 

 

with sessions (this stops table from sorting feature)....

 

<?php

session_start();

// Retrieve the URL variables (using PHP).
	$name = $_GET['name'];
	$name2 = $_GET['name2'];
	$name3 = $_GET['name3'];


$_SESSION['name'] = $_GET['name'];
$_SESSION['name2'] = $_GET['name2'];		
$_SESSION['name3'] = $_GET['name3'];	


//rest of code that displays data and table

?>

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.