Bonjour,
J'ai un formulaire que j'aimerais valider mais �a ne marche pas. Je ne peux pas valider le formulaire en javascript car ma page d'envois de courriel n'est pas sur le m�me serveur et j'utilise des Select Case
Voici ce que j'ai essayer:
Merci
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 <% sendUrl="http://schemas.microsoft.com/cdo/configuration/sendusing" smtpUrl="http://schemas.microsoft.com/cdo/configuration/smtpserver" ' Set the mail server configuration Set objConfig=CreateObject("CDO.Configuration") objConfig.Fields.Item(sendUrl)=2 ' cdoSendUsingPort objConfig.Fields.Item(smtpUrl)="relay-hosting.secureserver.net" objConfig.Fields.Update ' Create and send the mail Set objMail=CreateObject("CDO.Message") ' Use the config object created above Set objMail.Configuration=objConfig if request.form("email") <> "" objMail.From = """[email protected]""" & request.form("email") objMail.ReplyTo= request.form("email") else response.write ("Veuillez indique votre courriel") end if objMail.To="[email protected]" objMail.Subject="Abonnement" objMail.HTMLBody= "<table border='1' cellspacing='0' cellpadding='0' width='600'><tr><td width='300'><p><strong>Magazine</strong></p></td><td width='300'><p>" select case cstr(request.form("choix")) case "btn1" objMail.HTMLBody= objMail.HTMLBody & "Carcare Business" case "btn2" objMail.HTMLBody= objMail.HTMLBody & "Tire News" if request.form("company") <> "" objMail.HTMLBody= objMail.HTMLBody & request.form("company") else response.write ("Veuillez indique votre nom") end if if request.form("name") <> "" objMail.HTMLBody= objMail.HTMLBody & request.form("name") else response.write ("Veuillez indique votre nom") end if objMail.Send response.redirect "http://www.autosphere.ca/fr/merci-abonnement.html" %>
Fred
Partager