bonjour a tous
je suis un vrais débutant et j'essaie de rendre service a un ami pour son site qui ne fontionne plus entierement depuis le changement d'hebergeur et le concepteur qui a arreté son activité.
J'ai du refaire entierement son formulaire de contact qui maintenant fonctionne avec beaucoup de difficulté par contre je n'arrive pas a trouvé comment avoir le nom des champs dans ce qu'il recoit et rendre les chmaps obligatoire.
voici le code du formulaire.asp :
Avec cette page impossible egalement de faire fonctionner le choix du destinataire non plus et comment faire pour avoir les champs obligatoire ?
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 <%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title>CONTACT</title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> <link href="conso.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .Style1 { color: #FF0000; font-weight: bold; } --> </style> </head> <body link="#000000" vlink="#000000" alink="#000000" leftmargin="1" topmargin="1" marginwidth="1" marginheight="1"> <table width="100%" border="0" cellspacing="1" cellpadding="0" height="100%"> <tr> <td width="25" rowspan="3" valign="top" background="images/fond.gif"><img src="images/etiquette.gif" width="25" height="300"></td> <td height="30" background="images/barreb.gif" > <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td class="T3"> </td><br><br> <td class="T3b" align="right">Besoin d'un renseignement ? </td> </tr> </table></td> </tr> <tr> <td height="338" valign="top"> <form onSubmit="return ValidateForm()" method="post" action="forminfo.asp" onSubmit="return checkrequired(this)"> <table width="100%" border="0" cellspacing="0" cellpadding="0" height="100%"> <tr> <td colspan="3" align="center">Vous souhaitez écrire au service : <SELECT name="categorie"> <OPTION VALUE="admin@xxx.xx"selected>Administratif</OPTION> <OPTION VALUE="tech@xxx.xx">Technique-Logistique</OPTION> <OPTION VALUE="com@xxx.xx">Commercial</OPTION> </SELECT> </tr> <tr> <td width="50" height="32" align="center"> </td> <td> </td> <td width="150"> <span class="Style1">*</span>: champs obligatoires </td> </tr> <Tr> <td colspan="3" valign="top"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> Votre Nom: <input name="nom" type="text" id="nom" size="30"></p> Votre Société: <input name="societe" type="text" id="societe" size="30"></p> Adresse Email: <input name="email" type="text" id="email" size="30"></p> Votre question:<textarea name="question" cols="35" rows="10"></textarea></p> <input class="fancybut" type="submit" name="Submit" value="Envoyer"> <input class="fancybut" type="reset" name="Submit2" value="Effacer"></p> </form></td> <td width="16%" align="right" valign="top"></td> </tr> </table> <tr> <td height="20" align="right"> <table width="100%" border="0" cellspacing="0" cellpadding="0"> <tr> <td background="images/barreb2.gif"> </td> <td width="63" align="right"><a href="javascript:window.close()" onMouseOut="this.style.textDecoration='none'" onMouseOver="this.style.textDecoration='underline'" title="Fermer la fenêtre descriptive"><img src="images/icone/fermer.gif" border="0" width="16" height="16" hspace="3" align="absbottom">Fermer</a> </td> </tr> </table> </body> </html>
Voici l'autre page forminfo.asp
Si une personne ici pouvait me donner un petit coups de main cela serait super sympas.
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 <% @LANGUAGE="VBSCRIPT" CODEPAGE="1252"%> <html> <head> <title></title> <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> </head> <body> <% Set Mail = Server.CreateObject("SMTPsvg.Mailer") 'create an Asp mail component. Mail.FromName = Request.Form("nom") Mail.FromAddress= Request.Form("email") Mail.RemoteHost = "mrelay.perfora.net" ' Serveur pour expédition avec Asp Mail Mail.AddRecipient "Question site ", "xxx@xxx.xxx" Mail.Subject = "QUESTION SITE INTERNET" Mail.BodyText = Request.Form("societe")& Chr(13) Mail.BodyText = Request.Form("nom")& Chr(13) Mail.BodyText = Request.Form ("email")& Chr(13) Mail.BodyText = Request.Form("question") if Mail.SendMail then Response.Write "Votre Email nous est bien parvenu. Nous vous répondrons dès que possible.Merci !" else Response.Write "Impossible de transmettre le mail.Verifié que tous les champs soient renseignés " & Mail.Response end if %> </html>
Merci d'avance a tous
Partager