Index du Forum » » Le coin des codeurs

Auteur

pop up ki s'ouvre en fonction du choix.
millo-was
777      

  Posté : 16-07-2003 22:46

J'essaye de rajouter un bouton radio dans un formulaire mais j'aimerai que si ce dernier est sélectionné que lorsqu'on valide le formulaire une fenêtre Pop-up s'ouvre.
Comment dois-je m'y prendre ?

Merci.

P.S. Voila la page en question :

<? if ($SESSION["caddie"]->compte_elements() == 0) { ?>
<h2>Votre caddie est vide, visitez le <a class=normal href="<?=$wwwroot?>/achat">catalogue de services</a>.</h2>
<? return false; ?>
<? } ?>

<? $fleche_gauche = '<font color="red">&lt;=</font>';
$fleche_droite = '<font color="red">=&gt;</font>';
if (!empty($message_erreur)) {
echo '<font color="red">'.$message_erreur."</font>\n";
} ?>
<form name="entryform" action="<?=$PHP_SELF?>" method="post">
<font class=titre>Etape 1. Vos informations personnelles</font><br>
<font class=petit>(nécessaires pour prendre contact avec vous)</font>
<table cellpadding=0 cellspacing=0 width=100% border=0>
<tr>
<td width=25 class=normal class=normal nowrap><? if ($erreurs["client"]) echo $fleche_droite; ?></td>
<td class=normal>Client :</td>
<td><input class="formulaire1" type="text" name="client" size=50 value="<?=$client ?>"></td>
</tr>
<tr>
<td width=25 class=normal nowrap><? if ($erreurs["contact"]) echo $fleche_droite; ?></td>
<td class=normal>Tel. :</td>
<td><input class="formulaire1" type="text" name="contact" size=50 value="<?=$contact ?>"></td>
</tr>
<tr valign=top>
<td width=25 class=normal nowrap><? if ($erreurs["adresse"]) echo $fleche_droite; ?></td>
<td class=normal>Adresse :</td>
<td><input class="formulaire1" type="text" name="adresse" size=50 value="<?=$adresse?>"></td>
</tr>
<tr valign=top>
<td width=25 class=normal nowrap><? if ($erreurs["code_postal"]) echo $fleche_droite; ?></td>
<td class=normal>Code Postal :</td>
<td><input class="formulaire1" type="text" name="code_postal" size=50 value="<?=$code_postal ?>"></td>
</tr>
<tr valign=top>
<td width=25 class=normal nowrap><? if ($erreurs["ville"]) echo $fleche_droite; ?></td>
<td class=normal>Ville :</td>
<td><input class="formulaire1" type="text" name="ville" size=50 value="<?=$ville?>"></td>
</tr>
<tr valign=top>
<td width=25 class=normal nowrap><? if ($erreurs["pays"]) echo $fleche_droite; ?></td>
<td class=normal>Pays :</td>
<td><input class="formulaire1" type="text" name="pays" size=50 value="<?=$pays ?>"></td>
</tr>
<tr valign=top>
<td width=25 class=normal nowrap><? if ($erreurs["paiement"]) echo $fleche_droite; ?></td>
<td class=normal>Paiement* :</td>
<td class=petit>
<input type="radio" name="paiement" value="chèque" <?php if($frm["paiement"]=="chèque") echo "checked" ?>>Chèque
<input type="radio" name="paiement" value="virement" <?php if($frm["virement"]=="virement") echo "checked" ?>>Virement
<input type="radio" name="paiement" value="CB" <?php if($frm["CB"]=="CB") echo "checked" ?>>CB
</td>
</tr>
<tr valign=top>
<td width=25 class=normal nowrap>
<?if ($erreurs["transport"]) echo $fleche_droite; ?></td>
<td class=normal>Frais de port* :</td>
<td class=normal>
<?
if ($normal == 0)
{
echo "Frais d'expédition offert";
?>
<input type="hidden" name="transport" value="normal">
<?
}
else {
?>
<select class="formulaire1" name="transport">
<option value="normal" <?php if($frm["transport"]=="normal") echo "selected" ?>>Normal</option>
<option value="express" <?php if($frm["transport"]=="express") echo "selected" ?>>Express</option>
<option value="contre remboursement" <?php if($frm["transport"]=="contre remboursement") echo "selected" ?>>Contre-Remboursement</option>
</select>
<? }?>
</td>
</tr>

<!--<tr>
<td width=25 class=normal nowrap>PHP : if ($erreurs["carte_credit"]) echo $fleche_droite; </td>
<td class=normal>Carte de Crédit:</td>
<td><input type="text" name="carte_credit" size=25>
<span class=normal>Expire le:</span>
<input type="text" name="expiration" size=5>
<span class=normal>(AA/MM)</span>
PHP : if ($erreurs["expiration"]) echo '&nbsp;'.$fleche_gauche;
</td>
</tr>-->
<tr>
<td width=25 class=normal nowrap></td>
<td colspan=2 class=normal>Commentaires / Instructions Spéciales : </td>
</tr>
<tr>
<td colspan=2 nowrap>&nbsp;</td>
<td colspan=2><textarea class="formulaire1" name="commentaires" cols=50 rows=5><?=$commentaires ?></textarea></td>
</tr>
<tr>
<td colspan=3 align=center><br><input type="submit" value="Etape suivante" class="bouton"></td>
</tr>
<tr>
< ;td colspan=3 align=left class=petit>(*) Ne pas oublier d'indiquer votre moyen de paiement</td>
</tr>

</table>
<blockquote& gt;
</form>



Cet article provient de NPDS

http://www.npds.org/viewtopic.php?topic=6702&forum=5