Visualizzazione dei risultati da 1 a 5 su 5

Discussione: link in TR

  1. #1

    link in TR

    ciao a tutti, ho provato molte volte a cercare su internet.
    Non riesco a trovare il codice quando faccio onmouseover, cambiando il colore del <tr> ma non funziona href..


    codice:
     <tr href="profilawyer.php?recordID=<?php echo $row_lawyers['cognome']; ?>" onmouseover="this.className='trover'" onmouseout="this.className='trout'">
            <td><?php echo $row_lawyers['sigla']; ?>  </td>
            <td><?php echo $row_lawyers['cognome']; ?> </td>
            <td><?php echo $row_lawyers['nome']; ?></td>
          </tr>

    dovrei scrivere in css per fare il link o no?
    So che è una stupidaggine e ho perso un'ora solo per questo maledetto link...
    grazie
    ..:: GSFLASH ::..
    HTTP://WWW.GSFLASH.IT
    MCTS - ACP - OCP - ECDL
    Ubuntu 7.10/OpenSuse 10.3/Vista Premium/MacOSX Leopard
    My authentic japanese name is 薗田Sonoda (garden field) 大河 Taiga (big river)

  2. #2
    ho trovato

    onclick="window.location.href='profilawyer.php?rec ordID=<?php echo $row_lawyers['cognome']; ?>';




    ma non vorrei che fosse in javascript, perchè in firefox, ie7 possono disattivare javascript, non ce l'alternativa?

    Grazie
    ..:: GSFLASH ::..
    HTTP://WWW.GSFLASH.IT
    MCTS - ACP - OCP - ECDL
    Ubuntu 7.10/OpenSuse 10.3/Vista Premium/MacOSX Leopard
    My authentic japanese name is 薗田Sonoda (garden field) 大河 Taiga (big river)

  3. #3
    Utente bannato
    Registrato dal
    Sep 2007
    Messaggi
    2,777
    codice:
    <!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=utf-8" />
    <title>Documento senza titolo</title>
    </head>
    
    <body>
    
    <table border="4" cellpadding="0" cellspacing="0" width="400">
        <tr style="cursor:pointer" 
        	onclick="javascript:location.href='profilawyer.php?recordID=<?php echo $row_lawyers['cognome']; ?>" 
            onmouseover="this.className='trover'" 
            onmouseout="this.className='trout'">
            <td><?php echo $row_lawyers['sigla']; ?>  </td>
            <td><?php echo $row_lawyers['cognome']; ?> </td>
            <td><?php echo $row_lawyers['nome']; ?></td>
        </tr>
    </table>
    
    </body>
    </html>

  4. #4
    ti ringrazio e ho verificato nei diversi browser, provando a disattivare il javascript e non funzionano.
    Ho provato con il DIV e funzionano perfettamente in tutti i browser.
    Ti ringrazio molto.
    Ho fatto in questo modo:

    codice:
    <table border="0" align="left">
          <?php do { ?>
          <a href="profilawyer.php?recordID=<?php echo $row_lawyers['cognome']; ?>"><div style=" width:200px; cursor:pointer" onmouseover="this.className='trover'" onmouseout="this.className='trout'" onclick="this.className='trout'">
            
           <?php echo $row_lawyers['sigla']; ?> <?php echo $row_lawyers['cognome']; ?> <?php echo $row_lawyers['nome']; ?></div></a>
          
          <?php } while ($row_lawyers = mysql_fetch_assoc($lawyers)); ?>
        </table>


    e invece per come fare il redirect dopo l'invio del formail?

    codice:
    <?php
    
    
    
    
    
    // ------- three variables you MUST change below  -------------------------------------------------------
    $replyemail="info@info.com;//change to your email address
    $valid_ref1="index.php";// chamge "Your--domain" to your domain
    $valid_ref2="index.php";// chamge "Your--domain" to your domain
    // -------- No changes required below here -------------------------------------------------------------
    // email variable not set - load $valid_ref1 page
    if (!isset($_POST['email']))
    {
     echo "<script language=\"JavaScript\"><!--\n ";
     echo "top.location.href = \"$valid_ref1\"; \n// --></script>";
     exit;
    }
    
    $ref_page=$_SERVER["HTTP_REFERER"];
    $valid_referrer=0;
    if($ref_page==$valid_ref1) $valid_referrer=1;
    elseif($ref_page==$valid_ref2) $valid_referrer=1;
    if(!$valid_referrer)
    {
     echo "<script language=\"JavaScript\"><!--\n alert(\"ERROR - not sent.\\n\\nCheck your 'valid_ref1' and 'valid_ref2' are correct within contact_process.php.\");\n";
     echo "top.location.href = \"index.php\"; \n// --></script>";
     exit;
    }
    
    
    //check user input for possible header injection attempts!
    function is_forbidden($str,$check_all_patterns = true)
    {
     $patterns[0] = 'content-type:';
     $patterns[1] = 'mime-version';
     $patterns[2] = 'multipart/mixed';
     $patterns[3] = 'Content-Transfer-Encoding';
     $patterns[4] = 'to:';
     $patterns[5] = 'cc:';
     $patterns[6] = 'bcc:';
     $forbidden = 0;
     for ($i=0; $i<count($patterns); $i++)
      {
       $forbidden = eregi($patterns[$i], strtolower($str));
       if ($forbidden) break;
      }
     //check for line breaks if checking all patterns
     if ($check_all_patterns AND !$forbidden) $forbidden = preg_match("/(%0a|%0d|\\n+|\\r+)/i", $str);
     if ($forbidden)
     {
      echo "<font color=red><center><h3>STOP! Message not sent.</font></h3>
    
            The text you entered is forbidden, it includes one or more of the following:
            
    <textarea rows=9 cols=25>";
      foreach ($patterns as $key => $value) echo $value."\n";
      echo "\\n\n\\r</textarea>
    Click back on your browser, remove the above characters and try again.
            
    
    
    
    Thankfully protected by phpFormMailer freely available from:
            <a href=\"http://thedemosite.co.uk/phpformmailer/\">http://thedemosite.co.uk/phpformmailer/</a>";
      exit();
     }
     else return $str;
    }
    
    $name = is_forbidden($_POST["name"]);
    $email = is_forbidden($_POST["email"]);
    $thesubject = is_forbidden($_POST["thesubject"]);
    $themessage = is_forbidden($_POST["themessage"]);
    $ipmemory = is_forbidden($_POST["ipmemory"], false);
    
    $success_sent_msg='<p align="center"></p>
                       <p align="center">Your message has been successfully sent to us
    
                        and we will reply as soon as possible.</p>
                       <p align="center">A copy of your query has been sent to you.</p>
                       <p align="center">Thank you for contacting us.</p>';
    
    $replymessage = "Hi $name
    
    Thank you for your email.
    
    We will endeavour to reply to you shortly.
    
    Please DO NOT reply to this email.
    
    Below is a copy of the message you submitted:
    --------------------------------------------------
    Subject: $thesubject
    Query:
    $themessage
    --------------------------------------------------
    
    Thank you";
    
    $themessage = "Name: $name \nip:$ipmemory \nQuery: $themessage";
    mail("$replyemail",
         "$thesubject",
    	 "$themessage",
         "From: $email\nReply-To: $email");
    mail("$email",
         "Receipt: $thesubject",
         "$replymessage",
         "From: $replyemail\nReply-To: $replyemail");
    echo $success_sent_msg;
    
    
    
    ?>
    Dopo aver inviato e 5 secondi dopo torna nell'index.php....
    Oppure se avrete un consiglio migliore, vi ringrazio ancora
    Grazie
    ..:: GSFLASH ::..
    HTTP://WWW.GSFLASH.IT
    MCTS - ACP - OCP - ECDL
    Ubuntu 7.10/OpenSuse 10.3/Vista Premium/MacOSX Leopard
    My authentic japanese name is 薗田Sonoda (garden field) 大河 Taiga (big river)

  5. #5
    Utente di HTML.it L'avatar di Xinod
    Registrato dal
    Sep 2000
    Messaggi
    13,649
    niente minestroni, problema diverso discussione diversa

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.