Aller au contenu

MS-DOS_1991

Hubmaster
  • Compteur de contenus

    442
  • Inscrit(e) le

  • Dernière visite

Tout ce qui a été posté par MS-DOS_1991

  1. Il me semble que c'est impossible, justement parce que FireFox a été en partie programmé en xul+javascript. En tout cas, je n'ai jamais visité de site dans lequel les scroll-bars sont de couleur différentes sous FireFox
  2. De rien J'ai moi-même appris plein de choses sur l'opérateur ternaire en voulant t'aider, tout est donc pour le mieux dans le meilleur des mondes A+ sur le forum
  3. euh... lol tu es sûr d'avoir uploadé tes fichiers ? Je l'ai corrigé (démo sur ma page de test: /bp16/form.html) form.html <?xml version="1.0"?> <!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> <title>Achat de Cartons de Vin</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> // <!-- <[CDATA[ function calculerPrix(champs, span) { var prix; prix = champs * 4.50; prix = prix + '€'; document.getElementById(span).innerHTML = prix; } function calculerTotal(form, span) { var cartons_vin1; var cartons_vin2; var cartons_vin3; var total; cartons_vin1 = form.cartons_vin1.value * 4.5; cartons_vin2 = form.cartons_vin2.value * 4.5 ; cartons_vin3 = form.cartons_vin3.value * 4.5; total = Number(cartons_vin1) + Number(cartons_vin2) + Number(cartons_vin3); document.getElementById(span).innerHTML = '= ' + total + '€'; } // ]]> --> </script> </head> <body> <div id="contenu_principal"> <form method="post" action="traitement.php" id="cartons_vins"> <p><label for="Nom">Votre Nom : <input type="text" name="Nom" id="Nom" value="" /></label></p> <p><label for="Prenom">Votre Prénom : <input type="text" name="Prenom" id="Prenom" value="" /></label></p> <p><label for="Email">Votre email : <input type="text" name="Email" id="Email" value="" /></label></p> <p><label for="Adresse">Votre adresse : <textarea name="Adresse" id="Adresse"></textarea></label></p> <p><u>Vin 1</u></p> <p><label for="cartons_vin1">Nombre de carton(s) souhaité(s) : <input type="text" name="cartons_vin1" id="cartons_vin1" size="2" maxlength="2" onBlur="calculerPrix(this.value, 'affichage_prix-vin1')" value="0" /></label> x 4,50€ <span id="affichage_prix-vin1"> = 0.00€</span></p> <p><u>Vin 2</u></p> <p><label for="cartons_vin2">Nombre de carton(s) souhaité(s) : <input type="text" name="cartons_vin2" id="cartons_vin2" size="2" maxlength="2" onBlur="calculerPrix(this.value, 'affichage_prix-vin2')" value="0" /></label> x 4,50€ <span id="affichage_prix-vin2"> = 0.00€</span></p> <p><u>Vin 3</u></p> <p><label for="cartons_vin3">Nombre de carton(s) souhaité(s) : <input type="text" name="cartons_vin3" id="cartons_vin3" size="2" maxlength="2" onBlur="calculerPrix(this.value, 'affichage_prix-vin3');calculerTotal(this.form, 'affichage_total-vins')" value="0" /></label> x 4,50€ <span id="affichage_prix-vin3"> = 0.00€</span></p> <p><strong>Total : </strong> <span id="affichage_total-vins"> </span></p> <p><input type="submit" value="Envoyer" /><input type="reset" value="Annuler" /></p> </form> </div> </body> </html> traitement.php <?php // Formulaire envoye ? Champs Vides ? foreach($_POST as $champs => $valeur) { if($champs != 'cartons_vin1' AND $champs != 'cartons_vin2' AND $champs != 'cartons_vin3') { if(!isset($valeur) OR empty($valeur)) { echo '<script type="text/javascript">// <![CDATA[',"\n",'alert("Veuillez remplir tous les champs.");',"\n",'window.location="form.html";',"\n",'// ]]>',"\n",'</script>'; } } } // Declaration des variables $Nom = trim(strip_tags($_POST['Nom'])); $Prenom = trim(strip_tags($_POST['Prenom'])); $Email = trim(strip_tags($_POST['Email'])); $Adresse = trim(strip_tags($_POST['Adresse'])); $NbreCartons['vin1'] = trim(strip_tags($_POST['cartons_vin1'])); $NbreCartons['vin2'] = trim(strip_tags($_POST['cartons_vin2'])); $NbreCartons['vin3'] = trim(strip_tags($_POST['cartons_vin3'])); $SousTotal['vin1'] = $NbreCartons['vin1'] * 4.5; $SousTotal['vin2'] = $NbreCartons['vin2'] * 4.5; $SousTotal['vin3'] = $NbreCartons['vin3'] * 4.5; $Total = $SousTotal['vin1'] + $SousTotal['vin2'] + $SousTotal['vin3']; ?> <?php echo '<','?xml version="1.0" encoding="ISO-8859-1" ?','>',"\n"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-FR" dir="ltr"> <head xml:lang="fr-FR" dir="ltr"> <title> Achat de Cartons de Vin - Récapitulatif de votre Commande </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <div id="contenu_principal"> <h3>Récapitulatif de vos Informations :</h3> <p>Votre Nom : <strong><?php echo $Nom; ?></strong></p> <p>Votre Prénom : <strong><?php echo $Prenom; ?></strong></p> <p>Votre Adresse Email : <strong><?php echo $Email; ?></strong></p> <p>Votre Adresse Postale : <strong><?php echo $Adresse; ?></strong></p> <h3>Récapitulatif de votre Commande</h3> <p>Vous avez commandé <?php echo ($NbreCartons['vin1'] == 1) ? "<strong>{$NbreCartons['vin1']}</strong> carton " : "{$NbreCartons['vin1']} cartons "; ?>du vin n°1, soit un total de <strong><?php echo $SousTotal['vin1']; ?></strong> €.</p> <p>Vous avez commandé <?php echo ($NbreCartons['vin1'] == 1) ? "<strong>{$NbreCartons['vin2']}</strong> carton " : "{$NbreCartons['vin2']} cartons "; ?>du vin n°2, soit un total de <strong><?php echo $SousTotal['vin2']; ?></strong> €.</p> <p>Vous avez commandé <?php echo ($NbreCartons['vin1'] == 1) ? "<strong>{$NbreCartons['vin3']}</strong> carton " : "{$NbreCartons['vin3']} cartons "; ?>du vin n°3, soit un total de <strong><?php echo $SousTotal['vin3']; ?></strong> €.</p> <p style="font-weight: bold; color: #c00000;">Le total de votre commande s'élève donc à <strong><?php echo $Total; ?></strong> €.</p> <p><a href="form.html">Modifier vos Informations</a> | <a href="javascript:print()">Imprimer cette Page</a> </div> </body> </html>
  4. Honte sur moi !! J'ai oublié le ; de la ligne 5, dans traitement.php !! snif... snif.. par souci d'esthétique, j'ai amélioré un peu mon code: <?php // Formulaire envoye ? Champs Vides ? foreach($_POST as $champs => $valeur) { if(!isset($valeur) OR empty($valeur)) { echo '<script type="text/javascript">// <![CDATA[',"\n",'alert("Veuillez remplir tous les champs.");',"\n",'window.location="http://bricepap.free.fr/couronneau/form.htm";',"\n",'// ]]>',"\n",'</script>'; } } // Declaration des variables $Nom = trim(strip_tags($_POST['Nom'])); $Prenom = trim(strip_tags($_POST['Prenom'])); $Email = trim(strip_tags($_POST['Email'])); $Adresse = trim(strip_tags($_POST['Adresse'])); $NbreCartons['vin1'] = trim(strip_tags($_POST['cartons_vin1'])); $NbreCartons['vin2'] = trim(strip_tags($_POST['cartons_vin2'])); $NbreCartons['vin3'] = trim(strip_tags($_POST['cartons_vin3'])); $SousTotal['vin1'] = $NbreCartons['vin1'] * 4.5; $SousTotal['vin2'] = $NbreCartons['vin2'] * 4.5; $SousTotal['vin3'] = $NbreCartons['vin3'] * 4.5; $Total = $SousTotal['vin1'] + $SousTotal['vin2'] + $SousTotal['vin3']; ?> <?php echo '<','?xml version="1.0" encoding="ISO-8859-1" ?','>',"\n"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-FR" dir="ltr"> <head xml:lang="fr-FR" dir="ltr"> <title> Achat de Cartons de Vin - Récapitulatif de votre Commande </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <div id="contenu_principal"> <h3>Récapitulatif de vos Informations :</h3> <p>Votre Nom : <strong><?php echo $Nom; ?></strong></p> <p>Votre Prénom : <strong><?php echo $Prenom; ?></strong></p> <p>Votre Adresse Email : <strong><?php echo $Email; ?></strong></p> <p>Votre Adresse Postale : <strong><?php echo $Adresse; ?></strong></p> <h3>Récapitulatif de votre Commande</h3> <p>Vous avez commandé <?php echo ($NbreCartons['vin1'] == 1) ? "<strong>{$NbreCartons['vin1']}</strong> carton " : "{$NbreCartons['vin1']} cartons "; ?>du vin n°1, soit un total de <strong><?php echo $SousTotal['vin1']; ?></strong> €.</p> <p>Vous avez commandé <?php echo ($NbreCartons['vin1'] == 1) ? "<strong>{$NbreCartons['vin2']}</strong> carton " : "{$NbreCartons['vin2']} cartons "; ?>du vin n°2, soit un total de <strong><?php echo $SousTotal['vin2']; ?></strong> €.</p> <p>Vous avez commandé <?php echo ($NbreCartons['vin1'] == 1) ? "<strong>{$NbreCartons['vin3']}</strong> carton " : "{$NbreCartons['vin3']} cartons "; ?>du vin n°3, soit un total de <strong><?php echo $SousTotal['vin3']; ?></strong> €.</p> <p style="font-weight: bold; color: #c00000;">Le total de votre commande s'élève donc à <strong><?php echo $Total; ?></strong> €.</p> <p><a href="form.html">Modifier vos Informations</a> | <a href="javascript:print()">Imprimer cette Page</a> </div> </body> </html> => Le mot carton(s) est au singulier si 1 seul carton est commandé (logique)
  5. ReBonjour Voici le code : <?php // Formulaire envoye ? Champs Vides ? foreach($_POST as $champs => $valeur) { if(!isset($valeur) OR empty($valeur)) { echo '<script type="text/javascript">// <![CDATA[',"\n",'alert("Veuillez remplir tous les champs.");',"\n",'window.location="http://bricepap.free.fr/couronneau/form.htm";',"\n",'// ]]>',"\n",'</script>' exit; } } // Declaration des variables $Nom = trim(strip_tags($_POST['Nom'])); $Prenom = trim(strip_tags($_POST['Prenom'])); $Email = trim(strip_tags($_POST['Email'])); $Adresse = trim(strip_tags($_POST['Adresse'])); $NbreCartons['vin1'] = trim(strip_tags($_POST['cartons_vin1'])); $NbreCartons['vin2'] = trim(strip_tags($_POST['cartons_vin2'])); $NbreCartons['vin3'] = trim(strip_tags($_POST['cartons_vin3'])); $SousTotal['vin1'] = $NbreCartons['vin1'] * 4.5; $SousTotal['vin2'] = $NbreCartons['vin2'] * 4.5; $SousTotal['vin3'] = $NbreCartons['vin3'] * 4.5; $Total = $SousTotal['vin1'] + $SousTotal['vin2'] + $SousTotal['vin3']; ?> <?php echo '<','?xml version="1.0" encoding="ISO-8859-1" ?','>',"\n"; ?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-FR" dir="ltr"> <head xml:lang="fr-FR" dir="ltr"> <title> Achat de Cartons de Vin - Récapitulatif de votre Commande </title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> </head> <body> <div id="contenu_principal"> <h3>Récapitulatif de vos Informations :</h3> <p>Votre Nom : <strong><?php echo $Nom; ?></strong></p> <p>Votre Prénom : <strong><?php echo $Prenom; ?></strong></p> <p>Votre Adresse Email : <strong><?php echo $Email; ?></strong></p> <p>Votre Adresse Postale : <strong><?php echo $Adresse; ?></strong></p> <h3>Récapitulatif de votre Commande</h3> <p>Vous avez commandé <strong><?php echo $NbreCartons['vin1']; ?></strong> cartons du vin n°1, soit un total de <strong><?php echo $SousTotal['vin1']; ?></strong> €.</p> <p>Vous avez commandé <strong><?php echo $NbreCartons['vin1']; ?></strong> cartons du vin n°2, soit un total de <strong><?php echo $SousTotal['vin1']; ?></strong> €.</p> <p>Vous avez commandé <strong><?php echo $NbreCartons['vin1']; ?></strong> cartons du vin n°3, soit un total de <strong><?php echo $SousTotal['vin1']; ?></strong> €.</p> <p style="font-weight: bold; color: #c00000;">Le total de votre commande s'élève donc à <strong><?php echo $Total; ?></strong> €.</p> <p><a href="http://bricepap.free.fr/couronneau/form.htm">Modifier vos Informations</a> | <a href="javascript:print()">Imprimer cette Page</a> </div> </body> </html> C'est très possible: il suffit de rajouter à la fin de chaque balise <input /> l'attribut value: <input type="text" name="champs" id="champs" maxlength="2" value="0" /> Je n'y manquerai pas
  6. Bonjour à tous Je viens d'apprendre par l'intermédiaire du Site du Zéro que l'hébergeur Ovh propose l'offre suivante: Nom de domaine gratuit en .be pendant un an (offre jusqu'au 31 Janvier 2006) Voici la page de l'offre chez Ovh
  7. Bonjour Je crois qu'il existe une propriété css vertical-align qui remplace valign... à vérifier
  8. Salut Je ne suis pas un expert en javaScript (loin de là ). Ce code a cependant l'avantage de marcher (avantage indéniable n'est-ce pas? ) et d'être facilement adaptable (il suffit de changer les variables dans l'appel des fonctions: <?xml version="1.0"?> <!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> <title>Achat de Cartons de Vin</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" /> <script type="text/javascript"> // <!-- <[CDATA[ function calculerPrix(champs, span) { var prix; prix = champs * 4.50; prix = prix + '€'; document.getElementById(span).innerHTML = prix; } function calculerTotal(form, span) { var cartons_vin1; var cartons_vin2; var cartons_vin3; var total; cartons_vin1 = form.cartons_vin1.value * 4.5; cartons_vin2 = form.cartons_vin2.value * 4.5 ; cartons_vin3 = form.cartons_vin3.value * 4.5; total = Number(cartons_vin1) + Number(cartons_vin2) + Number(cartons_vin3); total = total + '€'; document.getElementById(span).innerHTML = total; } // ]]> --> </script> </head> <body> <div id="contenu_principal"> <form method="post" action="traitement.php" id="cartons_vins"> <p><label for="Nom">Votre Nom : <input type="text" name="Nom" id="Nom" value="" /></label></p> <p><label for="Prenom">Votre Prénom : <input type="text" name="Prenom" id="Prenom" value="" /></label></p> <p><label for="Email">Votre email : <input type="text" name="Email" id="Email" value="" /></label></p> <p><label for="Adresse">Votre adresse : <textarea name="Adresse" id="Adresse"></textarea></label></p> <p><u>Vin 1</u></p> <p><label for="cartons_vin1">Nombre de carton(s) souhaité(s) : <input type="text" name="cartons_vin1" id="cartons_vin1" size="2" maxlength="2" onBlur="calculerPrix(this.value, 'affichage_prix-vin1')" /></label> x 4,50€ = <span id="affichage_prix-vin1"> </span></p> <p><u>Vin 2</u></p> <p><label for="cartons_vin2">Nombre de carton(s) souhaité(s) : <input type="text" name="cartons_vin2" id="cartons_vin2" size="2" maxlength="2" onBlur="calculerPrix(this.value, 'affichage_prix-vin2')" /></label> x 4,50€ = <span id="affichage_prix-vin2"> </span></p> <p><u>Vin 3</u></p> <p><label for="cartons_vin3">Nombre de carton(s) souhaité(s) : <input name="cartons_vin3" id="cartons_vin3" type="text" size="2" maxlength="2" onBlur="calculerPrix(this.value, 'affichage_prix-vin3');calculerTotal(this.form, 'affichage_total-vins')" /></label> x 4,50€ = <span id="affichage_prix-vin3"> </span></p> <p><strong>Total : </strong> <span id="affichage_total-vins"> </span></p> <p><input type="submit" value="Envoyer" /><input type="reset" value="Annuler" onClick="razPrix()" /></p> </form> </div> </body> </html> edit: Désolé si cela paraît un peu fouillit au premier abord
  9. Salut J'ai trouvé ce tutorial qui pourrait correspondre à ce que tu recherches... Tiens-nous au courant
  10. Bonjour Je trouve -opinion personnelle bien sûr - que la partie gauche (menu) et haute (bannière et menu de navigation) sont trop proches et semblables en termes de couleur, ca fait un peu fouilli De plus je pense que tu devrais mettre "Choix du style Futuriste - Classique" sur la même ligne que "Accueil Forum Annuaire Contact" A part ça, le design a l'air pas mal, reste à savoir si le contenu suivra lui-aussi edit: il y a un bug avec FireFox sur la page des kits allopass (http://www.zone-webmasters.net/kits-graphiques-allopass.php)
  11. Salut goldrazor euh.... tu n'as pas un login/passe provisoire pour qu'on puisse vérifier ? et de plus quelles sont exactement les modifs que tu as faites à ton menu de config ?
  12. Clair et concis Bonjour à toi, banbou
  13. Salut Dans ton cas, cela se présenterait plutôt comme cela je pense (sans partie serveur pour plus de simplicité): <form action="mailto:tonadresseemail_AT_fournisseur.ext" method="post" enctype="text/plain"> <!-- ICI TES CHAMPS DE FORMULAIRE --> <input type="submit" value="Envoyer le Formulaire" /> </form> pas testé, je fais toujours ce genre de trucs en php
  14. Salut Tu peux peut-être faire cela en une seule liste avec optgroup qui s'utilise comme cela (selon mes souvenirs ): <select name="listepays_regions"> <optgroup label="france"> <option name="region_1" value="region_1">Region 1</option> ... <option name="region_x" value="region_x">Region X</option> </optgroup> <optgroup label="suisse"> <option name="region_1" value="region_1">Region 1</option> ... <option name="region_y" value="region_y">Region Y</option> </optgroup> <optgroup label="belgique"> <option name="region_1" value="region_1">Region 1</option> ... <option name="region_z" value="region_z">Region Z</option> </optgroup> </select> ou alors avec du javascript (plus vraisemblablement dans ton cas) mais je ne saurais pas le coder "a l'arrache"
  15. Salut Attention: ne pas confondre Java et JavaScript !! Ton menu est en JavaScript, pas en Java Commence donc par valider ta page (demande nous de l'aide au besoin) puis tourne toi vers les menus en css, plus faciles à mettre en places, accessibles et plus jolis
  16. MS-DOS_1991

    if, else

    <?php echo htmlEntities($reponse),'<a href="lien.php">Lien</a>'; ?> ... else echo "Et non, ce n'est pas l'image numéro ".$reponse,'<img src="tonimage.jpg" />'; ... Je ne comprends pas bien ce que tu souhaites faire
  17. MS-DOS_1991

    if, else

    Et si tu nous postait ton code ?
  18. Salut Tu devrais te tourner vers l'AJAX Ce site web te montre d'ailleurs un exemple que tu pourrais adapter à ta situation: tu choisis un departement, le serveur retourne une liste des codes postaux, tu choisis ton code postal, et le serveur te retourne ta ville... cool non ?
  19. Bonjour Tite précision pour Stone: le code d'Anonymous est en PHP alors que celui de Vincent est en JavaScript
  20. Salut C'est possible avec l'attribut disabled: <select name="monselect" disabled="disabled"> <option name="option_1" value="option_1">OPTION 1</option> <option name="option_2" value="option_2">OPTION 2</option> <option name="option_3" value="option_3">OPTION 3</option> </select> ou <select name="monselect"> <option name="option_1" value="option_1">OPTION 1</option> <option name="option_2" value="option_2" disabled="disabled">OPTION 2</option> <option name="option_3" value="option_3">OPTION 3</option> </select>
  21. Bienvenue à toi
  22. Pourtant il y en a un: <?php
  23. MS-DOS_1991

    Actualiser

    Salut Je ne suis pas sûr de comprendre à quoi cela sert mais bon... Pourquoi pas en JavaScript ? <script type="text/javascript"> // <[CDATA[ function RefreshPrevious() { window.history.go(-1); window.refresh(); } // ]]> </script> <a href="javascript:RefreshPrevious()">Rafraîchir Page Précédente</a> (pas testé et je suis nul en javascript )
  24. Au temps (autant) pour moi alors
  25. Bien vu Il me semble aussi que la fonction setcookie() renvoie le même type d'information que header(). Par conséquent, l'usage de l'une interdit l'autre P.S: Dites-moi si je me trompe
×
×
  • Créer...