IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

JavaScript Discussion :

Imprimer un formulaire ?


Sujet :

JavaScript

  1. #1
    Membre habitué
    Inscrit en
    Août 2004
    Messages
    497
    Détails du profil
    Informations forums :
    Inscription : Août 2004
    Messages : 497
    Points : 194
    Points
    194
    Par défaut Imprimer un formulaire ?
    bonjour,
    j'ai un formulaire à imprimer, mais l'ennui c'est que j'ai des bouton de type radio et checbox :
    Donc au début j'ai fait sa qui ne fonctionne pas évidemment:
    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
     
    <script LANGUAGE="JavaScript">
    function popup() {
       w=open("",'popup','width=800,height=500,toolbar=no,scrollbars=yes,resizable=yes');   
       w.document.write("<body>");   
       w.document.write("<strong>Modifier Commercial : </strong>"+document.forms[0].elements["commercial_id"].value+"<br /><br />");
       w.document.write("<strong>Sexe : </strong>"+document.forms[0].elements["sexe"].value+"<br /><br />");
       w.document.write("<strong>Nom :</strong>"+document.forms[0].elements["nom"].value+"<br /><br />");
       w.document.write("<strong>Prénom :</strong>"+document.forms[0].elements["prenom"].value+"<br /><br />");   
       w.document.write("<strong>Jour: </strong>"+document.forms[0].elements["dd"].value+"<br /><br />");
       w.document.write("<strong>Mois: </strong>"+document.forms[0].elements["mm"].value+"<br /><br />");
       w.document.write("<strong>Année: </strong>"+document.forms[0].elements["aaaa"].value+"<br /><br />");
       w.document.write("<strong>Adresse: </strong>"+document.forms[0].elements["adressel1"].value+"<br /><br />");   
       w.document.write("<strong>(suite) : </strong>"+document.forms[0].elements["adressel2"].value+"<br /><br />");
       w.document.write("<strong>Code postal : </strong>"+document.forms[0].elements["code_postal"].value+"<br /><br />");
       w.document.write("<strong>Ville :</strong>"+document.forms[0].elements["ville"].value+"<br /><br />");
     
       w.document.write("<strong>Pays :</strong>"+document.forms[0].elements["pays"].value+"<br /><br />");
       w.document.write("<strong>Téléphone domicile :</strong>"+document.forms[0].elements["ville"].value+"<br /><br />");
       w.document.write("<strong>Téléphone portable :</strong>"+document.forms[0].elements["site_web"].value+"<br /><br />");
       w.document.write("<strong>Niveau d'étude :</strong>"+document.forms[0].elements["email"].value+"<br /><br />");
       w.document.write("<strong>Type d'étude :</strong>"+document.forms[0].elements["contact"].value+"<br /><br />");
       w.document.write("<strong>Compétences :</strong>"+document.forms[0].elements["telephone"].value+"<br /><br /></p>");
       w.document.write("<strong>Email : </strong>"+document.forms[0].elements["vvvvvv"].value+"<br /><br /></p>");                           
       w.document.write("<strong>Notes :</strong>"+document.forms[0].elements["vvvvvv"].value+"<br /><br /></p>");                           
       w.document.write("<strong>PR&Eacute;PA MULTIMEDIA </strong>"+document.forms[0].elements["form_1"].value+"<br /><br /></p>");                           
       w.document.write("<strong>PR&Eacute;PA INFORMATIQUE</strong>"+document.forms[0].elements["form_2"].value+"<br /><br /></p>");                           
       w.document.write("<strong>GAMEDESIGNER</strong>"+document.forms[0].elements["form_3"].value+"<br /><br /></p>");                           
       w.document.write("<strong>WEBDESIGNER</strong>"+document.forms[0].elements["form_4"].value+"<br /><br /></p>");                           
       w.document.write("<strong>WEBMASTER</strong>"+document.forms[0].elements["form_5"].value+"<br /><br /></p>");                           
       w.document.write("<strong>INFOGRAPHIE / MULTIM&Eacute;DIA</strong>"+document.forms[0].elements["form_6"].value+"<br /><br /></p>");                           
       w.document.write("<strong>ADMINISTRATEUR SYSTEME ET R&Eacute;SEAUX</strong>"+document.forms[0].elements["form_7"].value+"<br /><br /></p>");                           
       w.document.write("<strong>MONTAGE VIDEO</strong>"+document.forms[0].elements["form_8"].value+"<br /><br /></p>");
       w.document.write("<strong>D&Eacute;VELOPPEUR</strong>"+document.forms[0].elements["form_9"].value+"<br /><br /></p>");                           
       w.document.write("<strong>COMMUNICATION VISUELLE</strong>"+document.forms[0].elements["form_10"].value+"<br /><br /></p>");                           
       w.document.write("<strong>ARCHITECTURE D'INT&Eacute;RIEUR</strong>"+document.forms[0].elements["form_11"].value+"<br /><br /></p>");                           
       w.document.write("<strong>D&Eacute;CORATION / SCENE D'INT&Eacute;RIEUR</strong>"+document.forms[0].elements["form_12"].value+"<br /><br /></p>");                           
       w.document.write("<strong>FLASH</strong>"+document.forms[0].elements["logiciel_1"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>ILLUSTRATOR</strong>"+document.forms[0].elements["logiciel_2"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>PHOTOSHOP</strong>"+document.forms[0].elements["logiciel_3"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>DIRECTOR</strong>"+document.forms[0].elements["logiciel_4"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>DREAMWEAVER</strong>"+document.forms[0].elements["logiciel_5"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>FIREWORKS</strong>"+document.forms[0].elements["logiciel_6"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>XPRESS</strong>"+document.forms[0].elements["logiciel_7"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>PREMIERE</strong>"+document.forms[0].elements["logiciel_8"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>AFTER EFFECTS</strong>"+document.forms[0].elements["logiciel_9"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>3DSMAX</strong>"+document.forms[0].elements["logiciel_10"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>IN DESIGN</strong>"+document.forms[0].elements["logiciel_11"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>MAYA</strong>"+document.forms[0].elements["logiciel_12"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>FINAL CUT</strong>"+document.forms[0].elements["logiciel_13"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>COMBUSTION</strong>"+document.forms[0].elements["logiciel_14"].value+"<br /><br /></p>");                                 
       w.document.write("<strong>AUTRES :</strong>"+document.forms[0].elements["logiciel_autre"].value+"<br /><br /></p>");                                                               
       w.document.write("<\/body>");
       w.document.close();
       w.print();
    }
    </script>
    Merci d'avance...

  2. #2
    Membre éclairé Avatar de Sheriff
    Inscrit en
    Octobre 2004
    Messages
    608
    Détails du profil
    Informations forums :
    Inscription : Octobre 2004
    Messages : 608
    Points : 718
    Points
    718
    Par défaut
    salut !
    tu peux faire un onbeforeprint et cacher tous les éléments indésirables...
    effectue des recherches de ce côté-là.
    @+

Discussions similaires

  1. Imprimer un formulaire uniquement
    Par Kaoziun dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 29/09/2006, 14h00
  2. [VB.NET] Imprimer un formulaire, A l'AIDE
    Par AzertyH dans le forum Windows Forms
    Réponses: 2
    Dernier message: 25/04/2006, 11h52
  3. Réponses: 1
    Dernier message: 24/04/2006, 05h46
  4. Réponses: 10
    Dernier message: 05/03/2006, 11h51
  5. Imprimer un formulaire
    Par lito74 dans le forum IHM
    Réponses: 2
    Dernier message: 22/12/2005, 16h06

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo