Lien "fermer la fenetre" dans fichier .j

Fermé
Maud75 - 10 sept. 2004 à 12:27
 Maud75 - 11 sept. 2004 à 21:15
Coucou àt ous,

J'ai créé una page en .js :

function affichage() {
FenetreAffichage = window.open('','NouvelleFenetre', 'toolbar=no,status=no,width=300,height=400')
FenetreAffichage.document.write("Vérifiez vos informations");
FenetreAffichage.document.write("<p><b>Nom : </b>" + document.formulaire1.nom.value);
FenetreAffichage.document.write("<br><b>Prénom : </b>" + document.formulaire1.prenom.value);
FenetreAffichage.document.write("<br><b>Adresse : </b>" + document.formulaire1.adresse.value);
FenetreAffichage.document.write("<br><b>Code postal : </b>" + document.formulaire1.codepostal.value);
FenetreAffichage.document.write("<br><b>Ville : </b>" + document.formulaire1.ville.value);
FenetreAffichage.document.write("<br><b>Votre numéro de téléphone : </b>" + document.formulaire1.telephone.value);
FenetreAffichage.document.write("<br><b>Votre E-mail : </b>" + document.formulaire1.email.value);
FenetreAffichage.document.write("<br><b>Type de bien : </b>" + document.formulaire1.typebien.value);
FenetreAffichage.document.write("<br><b>Nombre de pieces : </b>" + document.formulaire1.nbre.value);
FenetreAffichage.document.write("<br><b>Surface : </b>" + document.formulaire1.surface.value);
FenetreAffichage.document.write("<br><b>Prix souhaité : </b>" + document.formulaire1.prix.value);
FenetreAffichage.document.write("<br><b>adresse2 : </b>" + document.formulaire1.adresse2.value);
FenetreAffichage.document.write("<br><b>Commentaires : </b>" + document.formulaire1.commentaires.value);
FenetreAffichage.document.write("<p>Si vos informations sont exactes, merci de cliquer sur Envoyez !");
FenetreAffichage.document.write("<br>");
}


Cette oage s'ouvre parfaitement bien, contenu parfait.

Je voudrais insérer un lien pour fermer la fenetre, de type :

<A HREF="javascript:window.close()">Fermer la fenetre</A>

Mais je ne sais pas comment faire puisque je n'ai pas créer cette page en html...

Avez-vous des astuces à me filer ??
Merci pour votre aide,
Maud
A voir également:

4 réponses

FenetreAffichage.close()
peut-être ?
0
malheureusement cela ne marche pas.... personne n'a une autre idée ??

(Merci hi pour ton aide)
0
SirHill Messages postés 4060 Date d'inscription vendredi 19 mars 2004 Statut Contributeur Dernière intervention 19 avril 2020 542
11 sept. 2004 à 20:05
Salut,

Essaie le code suivant :
FenetreAffichage.document.write("<a href='javascript:window.close()'>Fermer la fenêtre</a>");
0
Hello,

C'est parfait !! Merci ca marche impeccable !

A bientot sur le forum ;-))

Maud
0