Bonjour.
Je souhaite afficher la valeur d'un champs dans une page html préalablement créée par un script vbs que voici
Le Tableau :
Le reste de la fonction :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 Dim fields 'Fields variable holds the fields name and type fields = Array(Array("title","I. Contact client – Préparation technique TVF"),Array("text","Nom :","nom_cont"),Array("text","Prénom :","prenom_cont"),Array("text","Téléphone :", "telephone"),Array("adr","Adresse :"),Array("text","Numéro de la Rue :","numrue_adr"),Array("text","Nom de la Rue :","rue_adr"),Array("text","Code Postal :","cp_adr"),Array("text","Ville :","ville_adr"),Array("textarea","Description de l'opération :","description_op"),Array("separator"),Array("title","II. Fiche d’intervention STC"),Array("text","Profil Matériel","profil_mat"),Array("text","Marque :","marque"),Array("text","Modèle :","modele"),Array("text","Utilisateur :","utilisateur"),Array("text","CPU :","CPU"),Array("text","Ram :","RAM"),Array("text","OS/Windows :","OS/WIN"),Array("text","IE :","IE"),Array("textarea","Autre(connexion,...) :","autre_mat"),Array("separator"),Array("titres","BaseTEAMS :"),Array("open_divs"),Array("text","Type :","type_bt"),Array("text","Matricule :","Matricule"),Array("text","Numéro de Société :","matsoc"),Array("text","Profil :","profil_bt"),Array("text","Version TEAMS :","versionTEAMS"),Array("text","Version COMPANION :","versionCOMPANION"),Array("text","Version CALLREPORT :","versionCALLREPORT"),Array("text","Répertoire","repertoire"),Array("close_divs"),Array("buttonjava"),Array("separator"),Array("titres","Baseréseau :"),Array("text","Nombre d'accès :","nbacces"),Array("text","License Pervasive :","license_pervasive"),Array("text","Type d'installation :","typeinst"),Array("text","Nom des accès TEAMS","nomaccesTEAMS"),Array("separator"),Array("titres","Droits Informatiques :"),Array("text","Répertoire :","droit_repertoire"),Array("text","Base de registre","droit_basereg"),Array("textarea","Autre :","autre_droit"),Array("separator"),Array("titres","Communication :"),Array("text","Module :","dialer"),Array("text","Version :","version"),Array("text","Host :","nom_host"),Array("textarea","Autre :","autre_dialer"),Array("separator"),Array("title","Information sur l'intervention : "),Array("text","Numéro KKO","Numcacao"),Array("text","Nom de l'intervenant","Nom_intervenant"),Array("text","Date de l'intervention :","date_intervention"),Array("text","Heure au début de l'intervention :","heuredeb"),Array("text","Heure à la fin de l'intervention :","heurefin"),Array("textarea","Commentaires(montant des frais,transport,...) :","com_int"),Array("separator"),Array("rmq","Remarque STC : ","rmqint"," Remarque Client:","rmqcontact"),Array("buttonvbs","go_report(fields)","Sauvegarder le compte-rendu et l'imprimer"),Array("buttonreset","Effacer tout"))
Je ne my connais pas spécialement en vbs j'ai donc mis un peu nimporte quoi a ce niveau là
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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104 Sub go_report(fields) fileName = "formulaire.html" Dim fso, f Set fso = CreateObject("Scripting.FileSystemObject") If (fso.fileExists (fileName)) Then Set f = fso.OpenTextFile ( fileName, 2 ) Else Set f = fso.CreateTextFile ( fileName ) End If f.write "<html>" + Chr(13) + "<body>" + Chr(13) + "<head>" + Chr(13) + "<hr>" + Chr(13) + "<img src=""image002.gif"" />" + Chr(13) + "<h1 align=""center"">COMPTE RENDU DINTERVENTION</h1>" + Chr(13) + "<hr />" + Chr(13) + "</head>" + Chr(13) + "<br />" f.write "<form name=""form1"" method=""post"">" For Each field in form1 f.write field.value Next For Each field in fields Select Case lcase(field(0)) Case "title" f.write "<table style=""text-align: left; width: 391px; height: 34px;"" border=""1"" cellpadding=""2"" cellspacing=""2""><tbody><tr><td><h3>"+field(1)+"</h3></td></tr></tbody></table><br /><br />" Case "titres" f.write "<h3><td><b><u>"+ field (1)+"</b></u><br></h3></td>" Case "text" f.write "<td>" f.write "<u>"+field(1)+"</u></td><br /><td>" f.write "<input type=" + field(0) + " name=""" + field(2) + """><br /></td><br />" Case "adr" f.write "<td>" f.write "<br />" f.write "<b><u>" + field(1) + "</u></b>" f.write "</td><br /><br/>" Case "textarea" f.write "<td><u>" + field(1) + "</u></td><br />" f.write "<td><TEXTAREA WRAP=""ON"" rows=""15"" cols=""75"" name=" + field(2) + "></TEXTAREA><br /></td><br />" Case "separator" f.write "<hr color=""black"" /><br>" Case "open_divs" f.write "<div id=""champs_1""><div align=""left"">" Case "close_divs" f.write "</div></div>" Case "rmq" f.write "<table class=MsoNormalTable border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse;mso-padding-alt:0cm 3.5pt 0cm 3.5pt'><tr><td width=614 valign=top style='width:460.5pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .5pt;padding:0cm 3.5pt 0cm 3.5pt'><p class=MsoNormal><b>"+field(1)+"<o:p></o:p></b></p></td></tr>" f.write "<tr><TD><TEXTAREA WRAP=""ON"" rows=""15"" cols=""75"" name="+ field(2) +"""></TEXTAREA></TD></tr>" f.write "<td width=614 valign=top style='width:460.5pt;border:solid windowtext 1.0pt; mso-border-alt:solid windowtext .5pt;padding:0cm 3.5pt 0cm 3.5pt'><p class=MsoNormal><b>"+ field(3) +"</b></p></td></tr>" f.write "<tr><TD><TEXTAREA WRAP=""ON"" rows=""15"" cols=""75"" name="+field(4)+"""></TEXTAREA></TD></tr></table><br /><br />" End Select Next f.write "</form>" f.write "<table class=""MsoNormalTable"" style=""border-collapse: collapse;"" border=""0"" cellpadding=""0"" cellspacing=""0"">" f.write "<tbody>" f.write "<tr style=""page-break-inside: avoid;"">" f.write "<td style=""padding: 0cm 3.5pt; width: 228.5pt;"" valign=""top"" width=""305"">" f.write "<p class=""MsoHeader"" style=""text-align: center;"" align=""center"">" f.write "<b>" f.write "<u>" f.write "<span style=""font-size: 14pt;"">Signature<span style="""">" f.write "</span>client " f.write "</span>" f.write "</u>" f.write "</b>" f.write "<b>" f.write "<span style=""font-size: 14pt;"">:<u><o:p></o:p>" f.write "</u>" f.write "</span>" f.write "</b>" f.write "</p>" f.write "</td>" f.write "<td style=""padding: 0cm 3.5pt; width: 232pt;"" valign=""top"" width=""309"">" f.write "<p class=""MsoHeader"" style=""text-align: center;""align=""center"">" f.write "<b>" f.write "<u>" f.write "<spanstyle=""font-size: 14pt;"">Signature intervenant""</span>" f.write "</u>" f.write "</b>" f.write "<b>" f.write "<spanstyle=""font-size: 14pt;""> :<u><o:p></o:p>" f.write "</u>" f.write "</span>" f.write "</b>" f.write "</p>" f.write "</td>" f.write "</tr>" f.write "</tbody>" f.write "</table>" f.write "<br />" f.write "</body>" f.write "</html>" f.close End sub </script>
Cela mafiche les valeur que je rentre dans mon autre formulaire mais sa ne les affiche pas au bon endroit (sa les affiche au dessus du formulaire)
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3 For Each field in form1 f.write field.value Next
Merci de me dire au placer ou alors quoi mettre pour réussir ce que je dois faire
Partager