Bonjour @ tous,
je me présente car c'est mon premier post :
Boub, 24ans, Herblay 95.
Je débute dans la programmation php/mysql et j'ai un problème avec du javascript dans PHP.
Je ne sais pas pourquoi, ce script :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 // début du tableau ( hors boucle ) echo '<table cellpadding=\'0\' cellspacing=\'0\'>'; // on fait une boucle qui va faire un tour pour chaque enregistrement while($data = mysql_fetch_array($req)) { // on affiche les informations de l'enregistrement en cours echo '<table border=\'0\' width=\'100%\' cellpadding=\'0\' cellspacing=\'0\'><tr><td onMouseOut=\'javascript:this.style.background=#FFFFFF\' onMouseOver=\'javascript:this.style.background=#C5E682\'><tabLe border=\'0\' width=\'100%\'><tr>'; echo '<td class=\'epnumber\'>'.$data['episode'].'</td>'; echo '<td class=\'eptitle\'>'.$data['title'].'</td>'; echo '<td class=\'taille\'>'.$data['size'].'</td>'; echo '<td class=\'epdl\'><a href='.$data['url'].'>afficher</a></td>'; echo '</tr></table></td></tr></table>'; } // fin du tableau html ( hors boucle ) echo '</table>';ne fonctionne pas. Alors qu'il fonctionne dans un document HTML basic. Je pense avoir un problème avec le " ou ' mais je n'en suis pas sure. Je ne suis meme pas sure de savoir si il est possible d'utiliser ce code dans mon fichier.
Code : Sélectionner tout - Visualiser dans une fenêtre à part onMouseOut=\'javascript:this.style.background=#FFFFFF\' onMouseOver=\'javascript:this.style.background=#C5E682\'
Merci pour votre eclairage et bonne soirée !







Répondre avec citation
Partager