Imprimer un formulaire ?
Posté : 22 sept. 2006, 23:06
Bonjour, j'essaie d'imprimer un formulaire, mais sa ne fonctionne que sous FF, pas sous IE :
puis pour le bouton ::::
Merci pour vos suggestions
Code : Tout sélectionner
function popup() {
w=open("",'popup','width=600,height=500,toolbar=no,scrollbars=yes,resizable=yes');
w.document.write("<body>");
w.document.write("Entreprise: "+document.forms[0].elements["entreprise"].value+"<BR><BR>");
w.document.write("Activité: "+document.forms[0].elements["activite"].value+"<BR><BR>");
w.document.write("Poste: "+document.forms[0].elements["poste"].value+"<BR><BR>");
w.document.write("Profil: "+document.forms[0].elements["profil"].value+"<BR><BR>");
w.document.write("Déscription: "+document.forms[0].elements["description"].value+"<BR><BR>");
w.document.write("Durée: "+document.forms[0].elements["duree"].value+"<BR><BR>");
w.document.write("Jour: "+document.forms[0].elements["dd"].value+"<BR><BR>");
w.document.write("Mois: "+document.forms[0].elements["mm"].value+"<BR><BR>");
w.document.write("Année: "+document.forms[0].elements["aaaa"].value+"<BR><BR>");
w.document.write("Contrat: "+document.forms[0].elements["contrat"].value+"<BR><BR>");
w.document.write("Rémunération: "+document.forms[0].elements["remuneration"].value+"<BR><BR>");
w.document.write("Société: "+document.forms[0].elements["societe"].value+"<BR><BR>");
w.document.write("Adresse: "+document.forms[0].elements["adresse"].value+"<BR><BR>");
w.document.write("Code Postal: "+document.forms[0].elements["code_postal"].value+"<BR><BR>");
w.document.write("Ville: "+document.forms[0].elements["ville"].value+"<BR><BR>");
w.document.write("Site web: "+document.forms[0].elements["site_web"].value+"<BR><BR>");
w.document.write("email: "+document.forms[0].elements["email"].value+"<BR><BR>");
w.document.write("Contact: "+document.forms[0].elements["contact"].value+"<BR><BR>");
w.document.write("Télephone: "+document.forms[0].elements["telephone"].value+"<BR><BR>");
w.document.write("<\/body>");
w.document.close();
w.print();
}
</script>Code : Tout sélectionner
<a href='javascript:popup()'><input type="button" class="submit" value="Imprimer" alt="Cliquez pour imprimer cette page" /></a>