Pre objasnenie ide o tabulku, ktora by mala by je sortovatelna pomocou jquerovskeho pluginu tablesorter. Ma to vsak tu chybu, ze v perlovskom kode to nefunguje.
Dakujem za vsetky postrehy, navrhy a pripomienky.
Kód: Vybrať všetko
#!C:\Perl\bin\perl.exe
print "Content-type: text/html\n\n";
print "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\"";
print " \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
print "<html>";
print "<head>";
print "<title>Uloha</title>";
print "<script type=\"text/javascript\" src=\"js/jquery-1.5js\"></script>";
print "<script type=\"text/javascript\" src=\"js/jquery-latest.js\"></script>";
print "<script type=\"text/javascript\" src=\"js/jquery.tablesorter.js\"></script>";
print "<script type=\"text/javascript\">";
print "$(document)\.ready(function()";
print "{";
print "$(\"#myTable\").tablesorter();";
print "}";
print ");";
print "$(document).ready(function()";
print "{";
print "$(\"#myTable\").tablesorter( {sortList: [[0,0], [1,0]]} );";
print "}";
print ");";
print "</script>";
print "</head>";
print "<body>";
print "<table id=\"myTable\" class=\"tablesorter\">";
print "<thead>";
print "<tr>";
print "<th>Key</th>";
print "<th>Value</th>";
print "</tr>";
print "</thead>";
print "<tbody>";
print "<tr>";
print "<td>Smith</td>";
print "<td>John</td>";
print "</tr>";
print "<tr>";
print "<td>With</td>";
print "<td>Mon</td>";
print "</tr>";
print "</tbody>";
print "</table>";
print "</body>";
print "</html>";