Condition PHP => fonction JS

Résolu
xactise Messages postés 507 Date d'inscription mardi 18 février 2003 Statut Membre Dernière intervention 22 juin 2012 - 30 mai 2006 à 15:22
pcgpegase Messages postés 96 Date d'inscription lundi 24 novembre 2003 Statut Membre Dernière intervention 24 avril 2007 - 30 mai 2006 à 15:39
Bonjours j'aimerai savoir comment lacer une fonction JAvascript (précédement défini biensur) en fonction d'une condition en PHP ?
exemple :
if($a!=$b) {
// je lance ma fonction javascript
}

D'avance merci

1 réponse

pcgpegase Messages postés 96 Date d'inscription lundi 24 novembre 2003 Statut Membre Dernière intervention 24 avril 2007 1
30 mai 2006 à 15:39
Bonjour,

if ($a != $b) {
  echo '<script type="texte/javascript" language="javascript">tafonction()</script>';
}

:)
3
Rejoignez-nous