Bonjour, j'utilise le composant AspSmartUpload pour permettre à l'utilisateur d'uploader un fichier.

J'aimerai auparavant vérifier qu'il a bien sélectionné un fichier avant l'upload.
Le champ de selection du fichier se nomme "fichier"

Je pense qu'il faut utiliser la propriété "Ismissing", mais je ne sais pas comment l'integrer dans mon code.

Merci pour votre aide


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
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
<%
if request.form("action")="Envoyer" then
 
Set JMail = Server.CreateObject("Persits.MailSender") 
 
' Ne pas toucher ce parametre adresse du serveur SMTP 
JMail.Host = "smtp.internet-fr.net" 
 
Subject = "Support Datalys"
 
' Ne pas toucher ces parametres adresse du demandeur et sujet du mail defini ci dessus
JMail.From = Request.Form("email")
JMail.Subject = Subject
 
 
 ' Modifier ce parametre adresse du destinataire
JMail.AddAddress "support@datalys.net"
 
 
JMail.Body = body
 
'codage type html
JMail.IsHTML = True 
 
'définition du corp du texte
Dim Ct
Ct="<html>"
ct=ct&"<body>"
Ct = ct&"<font face=arial size=2><b>DEMANDE DE SUPPORT SUR :</b><br>"& request.form("produits") &"<br><br><b>INFORMATIONS CONTACTS</b><br>Société ou organisme : " & request.form("Societe") &"<br>Genre : " & request.form("genre") &"<br>Prenom : " & request.form("prenom") &"<br>Nom : " & request.form("nom") &"<br>Service : " & request.form("service") &"<br>Adresse 1 : " & request.form("adresse1") &"<br>Adresse 2 : " & request.form("adresse2") &"<br>BP : " & request.form("bp") &"<br>Code Postal : " & request.form("cp") &"<br>Ville : " & request.form("ville") &"<br>Cedex : " & request.form("cedex") &"<br>Pays : " & request.form("Pays") &"<br>Telephone : " & request.form("telephone") &"<br>Fax : " & request.form("telecopie") &"<br>Email : " & request.form("email") &"<br><br><b>N° DE LICENCE DU DEMANDEUR ET VERSION DU LOGICIEL : </b><br>Licence N° : " & request.form("numerolicence") &"<br>Version N° : " & request.form("numeroversion") &"<br><br><b>INFORMATIONS CONCERNANT LE SYTEME INFORMATIQUE</b><br>Type processeur : " & request.form("processeur") &"<br>Vitesse processeur Mhz : " & request.form("mghz") &"<br>Mémoire vive :  " & request.form("memoire") &"<br>Disque dur : " & request.form("dd") &"<br>Imprimante : " & request.form("imprimante") &"<br>Système d'exploitation : " & request.form("system") &"<br>Logiciels installés : <br>" & request.form("office") &"<br>"& request.form("Ie") &"<br><br><b>VOTRE PROBLEME</b><br>" & request.form("commentaires") &"><br><br><b>CLASSIFICATION DU PROBLEME</b><br>Type : " & request.form("Type") &"<br>Priorité :  " & request.form("Priorite") &"<br>Reproductibilité :  " & request.form("Reproductibilite") &"</font>"
Ct=ct&"</body>"
ct=ct&"</html>"
JMail.Body = ct
 
JMail.Priority = 3 
 
JMail.Send
 
response.redirect("RetourSupport.htm")
 
end if
 
%>
 
 
 
 
<html>
 
<head>
 
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
 
<meta name="GENERATOR" content="Microsoft FrontPage 6.0">
 
<meta name="ProgId" content="FrontPage.Editor.Document">
 
<title>Formulaire Support</title>
 
<base target="_self">
<script language="javascript">
 
<!-- Begin
 
if (window == top) top.location.href="www.datalys.net";
 
//  End -->
 
</script>
 
 
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}
 
function MM_validateForm() { //v4.0
  var i,p,q,nm,test,num,min,max,errors='',args=MM_validateForm.arguments;
  for (i=0; i<(args.length-2); i+=3) { test=args[i+2]; val=MM_findObj(args[i]);
    if (val) { nm=val.name; if ((val=val.value)!="") {
      if (test.indexOf('isEmail')!=-1) { p=val.indexOf('@');
        if (p<1 || p==(val.length-1)) errors+='- '+nm+' doit contenir une adresse valide.\n';
      } else if (test!='R') { num = parseFloat(val);
        if (isNaN(val)) errors+='- '+nm+' ne doit contenir que des chiffres.\n';
        if (test.indexOf('inRange') != -1) { p=test.indexOf(':');
          min=test.substring(8,p); max=test.substring(p+1);
          if (num<min || max<num) errors+='- '+nm+' doit contenir un nombre entre '+min+' and '+max+'.\n';
    } } } else if (test.charAt(0) == 'R') errors += '- '+nm+' est requis.\n'; }
  } if (errors) alert('Vous devez remplir tous les champs obligatoires :\n'+errors);
  document.MM_returnValue = (errors == '');
}
//-->
</script>
 
 
</head>
 
 
 
<body bgproperties="fixed" leftmargin="15">
 
 
<form method="POST" action="formsupport.asp">
 
 
    <center>
 
    <table border="0" width="100%">
 
      <tr>
 
        <td width="100%">
 
  <h1 align="center"><font face="Arial" size="2"><i> <b><font color="#17277C">Compléter 
 
    ce formulaire et cliquer sur &quot;Envoyer&quot;.<br>
  </font></b></i></font><b><font color="#17277C" face="Arial" size="2"><i>
    (les champs avec * sont obligatoires)</i></font></b></h1>
 
  <p><font face="Arial" color="#17277C" size="2">Sélectionnez le produit pour 
 
    lequel vous désirez une assistance</font></p>
 
  <p><font face="Arial"><select name="produits" size="1">
 
      <option>AZUR</option>
 
      <option>OSIRIS</option>
 
      <option>GRAMS</option>
 
      <option>SPECTRAL SERVER</option>
 
      <option>SPECTRAL ID</option>
 
    </select>*</font></p>
 
  <TABLE BORDER=0 CELLSPACING=0 width="100%" height="424">
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <p align="left"><b><font face="Arial" size="2" color="#17277C">Société 
 
          ou organisme</font></b></p>
 
      </TD>
 
      <TD width="391" height="27"> 
 
        <p><font face="Arial" size="2"> 
 
          <INPUT TYPE="text" NAME="Societe" VALUE="" SIZE=50>*</font> </p>
 
      </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <p align="left"><b><font face="Arial" size="2" color="#17277C">Genre</font></b></p>
 
      </TD>
 
      <TD width="391" height="27"> 
 
        <p><font face="Arial"> 
 
          <select size="1" name="genre">
 
            <option selected>Madame</option>
 
            <option>Mademoiselle</option>
 
            <option>Monsieur</option>
 
          </select>
 
          </font></p>
 
      </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Prénom</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="prenom" VALUE="" SIZE=50>*
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Nom</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="nom" VALUE="" SIZE=50>*
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Service</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="service" VALUE="" SIZE=50>
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Adresse 
 
          1</font> </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="adresse1" VALUE="" SIZE=50>*
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Adresse 
 
          2</font> </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="adresse2" VALUE="" SIZE=50>
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">BP</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="bp" VALUE="" SIZE=5>
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Code 
 
          postal</font> </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2">&nbsp;<!--webbot bot="Validation" s-data-type="Number" s-number-separators="x," b-value-required="TRUE" i-minimum-length="5" i-maximum-length="5" --><INPUT TYPE="text" NAME="cp" VALUE="" SIZE=5 maxlength="5">*
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Ville</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="ville" VALUE="" SIZE=50>*
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Cedex</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="cedex" VALUE="" SIZE=5>
 
        </font> </TD>
 
    </TR>
 
    </center>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <p align="left"><b><font face="Arial" size="2" color="#17277C">Pays</font></b>
 
      </TD>
 
 
 
 
    <center>
 
      <TD width="391" height="27"> <font face="Arial" size="2"><INPUT TYPE="text" NAME="Pays" VALUE="" SIZE=50>*</font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Téléphone</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="telephone" VALUE="" SIZE=15>*
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Télécopie</font> 
 
          </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="telecopie" VALUE="" SIZE=15>
 
        </font> </TD>
 
    </TR>
 
    <TR> 
 
      <TD WIDTH=136 align="right" height="27"> 
 
        <div align="left"><b><font face="Arial" size="2" color="#17277C">Adresse 
 
          électronique</font> </b></div>
 
      </TD>
 
      <TD width="391" height="27"> <font face="Arial" size="2"> 
 
        <INPUT TYPE="text" NAME="email" VALUE=""
 
SIZE=50>*
 
        </font> </TD>
 
    </TR>
 
  </TABLE>
 
  <p>&nbsp;</p>
 
  <P><font face="Arial" size="2" color="#17277C">Quel est votre numéro de licence 
 
    ?</font><font face="Arial" size="2" color="#FFFFFF"><br>
 
</font><input type="text" name="numerolicence" size="50">*</P>
 
  <P><font face="Arial" size="2" color="#17277C">Quel est le numéro de version du 
 
    logiciel ?<br>
          </font><font color="#17277C" size="2" face="Arial"><i>(Vous le trouverez 
          dans la boite de dialogue &quot;A propos...&quot; du logiciel en cliquant 
          dans le menu &quot;AIDE&quot;)</i><br>
          </font> 
          <input type="text" name="numeroversion" size="50">*</P>
 
<BLOCKQUOTE>
 
<P align="left">&nbsp;</P>
 
</BLOCKQUOTE>
 
        <P align="left"><font face="Arial" color="#17277C" size="2"><b>Information concernant 
          votre système</b></font></P>
 
  <table border="0" width="100%" align="left">
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <p align="left"><b><font color="#17277C" face="Arial" size="2">Modèle 
 
          processeur :</font></b></p>
 
      </td>
 
      <td width="224" align="left"><font color="#FFFFFF"> 
 
        <select size="1" name="processeur">
 
          <option>486</option>
 
          <option selected>Pentium II ou III</option>
 
          <option>Pentium Celeron</option>
 
          <option>AMD K6</option>
 
          <option>AMD Athlon</option>
 
        </select>
 
        </font></td>
 
    </tr>
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <div align="left"><b><font color="#17277C" face="Arial" size="2">Vitesse 
 
          du processeur en Mhz :</font></b></div>
 
      </td>
 
      <td width="224" align="left"><font color="#FFFFFF"> 
 
        <input type="text" name="mghz" size="20">
 
        </font></td>
 
    </tr>
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <div align="left"><b><font color="#17277C" face="Arial" size="2">Quantité 
 
          mémoire vive en Mo :</font></b></div>
 
      </td>
 
      <td width="224" align="left"><font color="#FFFFFF"> 
 
        <input type="text" name="memoire" size="20">
 
        </font></td>
 
    </tr>
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <div align="left"><b><font color="#17277C" face="Arial" size="2">Taille 
 
          disque dur en Go :</font></b></div>
 
      </td>
 
      <td width="224" align="left"><font color="#FFFFFF"> 
 
        <input type="text" name="dd" size="20">
 
        </font></td>
 
    </tr>
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <div align="left"><b><font color="#17277C" face="Arial" size="2">Imprimante 
 
          :</font></b></div>
 
      </td>
 
      <td width="224" align="left"><font color="#FFFFFF" face="Arial" size="2"> 
 
        <input type="text" name="imprimante" size="30">
 
        </font></td>
 
    </tr>
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <div align="left"><b><font color="#17277C" face="Arial" size="2">Système 
 
          d'exploitation :</font></b></div>
 
      </td>
 
      <td width="224" align="left"><font color="#FFFFFF"> 
 
        <input type="text" name="system" size="30">
 
        </font></td>
 
    </tr>
 
    <tr> 
 
      <td width="30%" align="right" nowrap> 
 
        <div align="left"><b><font color="#17277C" face="Arial" size="2">Logiciels 
 
          installés :</font></b></div>
 
      </td>
 
      <td width="100%" align="left"> 
 
        <font face="Arial" size="2"><font color="#17277C">
 
        <input type="checkbox" name="office" value="Microsoft Office">Office</font>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
        <font color="#17277C"><input type="checkbox" name="Ie" value="Internet explorer">Internet explorer</font></font></td>
 
    </tr>
 
  </table>
 
<P align="left">&nbsp;</P>
 
<BLOCKQUOTE>
 
<P>&nbsp;</P>
 
<P>&nbsp;</P>
 
<P>&nbsp;</P>
 
<P>&nbsp;</P>
 
<P>&nbsp;</P>
 
<P>&nbsp;</P>
 
</BLOCKQUOTE>
 
  <P><b><font size="2" face="Arial" color="#17277C">Décrivez le plus précisément 
 
    possible le problème rencontré :</font></b></P>
 
<P align="left"><font face="Arial" color="#FFFFFF">
 
    <TEXTAREA NAME="commentaires" ROWS=8 COLS=65></TEXTAREA>
 
    </font></P>
 
<H4><font face="Arial" color="#FFFFFF">&nbsp;</font><font size="2" face="Arial" color="#FFFFFF"><b>&nbsp;&nbsp;
 
</b></font><font face="Arial" color="#FFFFFF">&nbsp;&nbsp;&nbsp; </font>&nbsp;&nbsp; </H4>
 
        <H4> <font size="2" face="Arial" color="#17277C"><b>Classification du problème&nbsp;&nbsp;&nbsp; 
          </b></font><font color="#17277C">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
          </font></H4>
 
  <table border="0" width="100%">
 
    <tr> 
 
            <td width="33%" align="left"><font color="#17277C" size="2" face="Arial"><b>Type</b></font></td>
 
            <td width="33%" align="left"><font color="#17277C" size="2" face="Arial"><b>Priorité</b></font></td>
 
            <td width="34%" align="left"><font color="#17277C" size="2" face="Arial"><b>Reproductibilité</b></font></td>
 
    </tr>
 
    <tr> 
 
      <td width="33%"><font color="#17277C" size="2" face="Arial"> 
 
        <input type="radio" value="Erreur logiciel" name="Type">Erreur logiciel</font></td>
 
      <td width="33%"><font color="#17277C" size="2" face="Arial"><input type="radio" name="Priorite" value="Haute">Haute</font></td>
 
      <td width="34%"><font color="#17277C" size="2" face="Arial"><input type="radio" name="Reproductibilite" value="Systématique">Systématique</font></td>
 
    </tr>
 
    <tr> 
 
      <td width="33%"><font color="#17277C" size="2" face="Arial"> 
 
        <input type="radio" value="Utilisation générale" name="Type">Utilisation générale</font></td>
 
      <td width="33%"><font color="#17277C" size="2" face="Arial"><input type="radio" name="Priorite" value="Moyenne">Moyenne</font></td>
 
      <td width="34%"><font color="#17277C" size="2" face="Arial"><input type="radio" name="Reproductibilite" value="Difficile">Difficile</font></td>
 
    </tr>
 
    <tr> 
 
      <td width="33%"></td>
 
      <td width="33%"><font color="#17277C" size="2" face="Arial"><input type="radio" name="Priorite" value="Faible">Faible</font></td>
 
      <td width="34%"><font color="#17277C" size="2" face="Arial"><input type="radio" name="Reproductibilite" value="Aléatoire">Aléatoire</font></td>
 
    </tr>
 
  </table>
 
<p>&nbsp;</p>
 
<BLOCKQUOTE><P><font face="Arial" color="#FFFFFF"><INPUT TYPE="submit" name="action"
onClick="MM_validateForm('Societe','','R','nom','','R','prenom','','R','adresse1','','R','CP','','RisNum','pays','','R','email','','RisEmail');return document.MM_returnValue" value="Envoyer">
    <input type="reset" value="Effacer" name="effacer"></BLOCKQUOTE>
 
 
      </tr>
 
    </table>
 
</form>
 
 
 
</body>
 
 
 
</html>