Jump to content

hidden value


sandy1028

Recommended Posts

Hi,

 

I have to sort the table independent of the columns...

I have to pass the hidden value of the column to other column so that the sort order of one column doesnot change when clicked on the other column header.

How can i pass the hidden value.

 

When I click on the particular column the sort should change. How to pass the hidden value of $name along with the address. Now when i click on the Address when Name column is in decesding the sort order changes to ascending which should not happen until the Name header is clciked

 

 

if($name != "asc")
{
echo "<ul><li class=\"connection\" id=\"name1\"><a href=\"tree.php?name=asc#name1\">Name</a>";
}
else if($name == "asc"){
echo "<ul><li class=\"connection id=\"name1\"><a href=\"tree.php?name=desc#name1\">Name</a>";
}
echo "<ul>";

if($name == "asc")
{
foreach($lines as $line)
{
//Some code of sorting 
}
}
if($name != "asc")
{
foreach($lines as $line)
{
        $text_line=explode(":",$line);
//some code of sorting decending


if($address != "asc")
{
echo "<li class=\"connection\" id=\"address1\"><a href=\"tree.php?address=asc#address1\">Address</a>";
}
if($address == "asc"){
echo "<li class=\"connection\" id=\"address1\"><a href=\"tree.php?address=desc#address1\">Address</a>";
}



 

 

 

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.