Visualizzazione dei risultati da 1 a 3 su 3
  1. #1
    Utente di HTML.it
    Registrato dal
    Feb 2014
    Messaggi
    58

    Ordinamento tabella HTML con jquery

    Ragazzi ho questo codice e non c'è nulla da fare non vuole funzionare jquery! Non mi funziona! Dove sbaglio??

    Codice PHP:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /><script src="../tablesorter/js/jquery.js" type="text/javascript"></script>  <script src="../tablesorter/js/jquery.tablesorter.js" type="text/javascript"></script> </head><body> <script type="text/javascript">  $(document).ready(function()  {   $("table").tablesorter(); }  );  </script>     <table border="1" class="tablesorter" id="table" >    <thead><tr>        <th><b>ID</b></th>        <td><b>AVVIA TRATTATIVA</b></td>        <td><b>STATO TRATTATIVA</b></td>        <th><b>USERNAME</b></th>       <th><b>NAZIONALITA'</b></th>       <th><b>CAMBIO EURO</b></th>       <th><b>QUANTITA' DISPONIBILE PER LA VENDITA</b></th>       <th><b>METODI DI PAGAMENTI ACCETTATI</b></th>       <th><b>STATUS</b></th>   </tr>   </thead>
    <?php session_start();require_once('lib/Users.class.php');$login = New Users;$login->access_denied();$db_username $login->get_username();$attiva "ATTIVA";
     
    // includiamo il file di configurazione      include "db_config_reload.php";
    // seleziono i campi nelle varie tabelle$query = mysql_query("SELECT seller.id, seller.username, seller.change, seller.amount, seller.paymetod, users.nazionalita FROM seller, users WHERE seller.username = users.username AND seller.status_trattativa = 0") or die(mysql_error());  
    // scorro con un array la query e quindi i vari campi delle varie tabellewhile($row = mysql_fetch_array($query))
    {
        
    extract($row);    $table .= " <tbody> ";    $table .= "<tr>";    $table .= (($i++)%== 0) ? "<tr style=\"background-color: #DDDDDD;\">" "<tr style=\"background-color: #FFFFFF;\">";    $table .= "<form action=\"insert_ask.php\" method=\"post\">";    $table .= "<input type=\"hidden\" name=\"insert_ask\" value=\"{$id};{$change};{$amount};{$paymetod};{$username};{$db_username}\" /> ";    $table .= "<td> {$id} </td>";    $table .= "<td> <input type=\"submit\" value=\"Avvia Trattativa\" onClick=\"return confirm('Trattativa id: $id, sicuro che &egrave questa la trattativa che vuoi avviare?');\"/> </td>";    $table .= "</form>";     $table .= "<td> {$status_trattativa} {$attiva} </td>";    $table .= "<td> {$username} </td>";    $table .= "<td> {$nazionalita} </td>";    $table .= "<td> {$change} </td>";    $table .= "<td> {$amount} </td>";    $table .= "<td> {$paymetod} </td>";    

        if(
    mysql_num_rows(mysql_query("SELECT username FROM users_online WHERE username = '".$username."'")) > 0)    {        $table .= "<td> ONLINE </td>";    }    else    {        $table .= "<td> OFFLINE </td>";    }    $table .= "</tr>";    $table .= " </tbody> ";}$table .= "</table>"; echo $table;?></body></html>
    non so perche tutto il codice qui sul forum me lo ammucchia come se non prendesse gli a capo.
    Ultima modifica di snakom23; 21-02-2014 a 16:22

  2. #2
    Utente di HTML.it L'avatar di luca200
    Registrato dal
    Apr 2002
    Messaggi
    4,120
    che c'entra jquery con php?

  3. #3
    Utente di HTML.it
    Registrato dal
    Feb 2014
    Messaggi
    58
    vero ho sbagliato sezione se potete eliminate il post che lo rifaccio nell'apposita sezione con il codice giusto!

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved.