elimare campi request form Asp

creativentt

Nuovo Utente
24 Nov 2011
3
0
0
Ciao a tutti il form e grazie anticipate a chi vorrà aiutarmi..
ho un form flash collegato a un file asp, non masticando codice.. avrei bisogno di togliere la compilazione obbligatoria (request field) da alcuni di questi campi.. ma non so che codice usare...

'Request form fields
Dim MailFrom, MailFName, MailLName, MailCompany, MailWebsite, MailCountry, MailSubject, MailMessage
MailFrom = Trim(Request.Form("email_field"))
MailFName = Trim(Request.Form("fname_field"))
MailLName = Trim(Request.Form("lname_field"))
MailCompany = Trim(Request.Form("company_field"))
MailWebSite = Trim(Request.Form("website_field"))
MailCountry = Trim(Request.Form("country_field"))
MailSubject = Trim(Request.Form("subject_field"))
MailMessage = Trim(Request.Form("message_field"))
MailSettore = Trim(Request.Form("settore_field"))
MailIndirizzo = Trim(Request.Form("indirizzo_field"))
MailVia = Trim(Request.Form("via_field"))
MailCap = Trim(Request.Form("cap_field"))
MailNazione = Trim(Request.Form("nazione_field"))
MailTelefono = Trim(Request.Form("telefono_field"))
MailFax = Trim(Request.Form("fax_field"))
MailRadio01 = Trim(Request.Form("radio01_field"))
MailRadio02 = Trim(Request.Form("radio02_field"))
MailRadio03 = Trim(Request.Form("radio03_field"))
MailRadio04 = Trim(Request.Form("radio04_field"))
MailSenderIP = Request.ServerVariables("REMOTE_ADDR")
 
codice compelato

Questo ti fa capire quanto mastico di ASP :)
Ecco il codice completo.


<%

'Variables
Dim MailCharset, MailServer, MailServerUser, MailServerPass, MailTo, MailComponent
MailCharset = "ISO-8859-9" ' Mail message charset
MailServer = "mail.server.net" ' Your smtp mail server (Only for JMAil and ASPMail). If you don't known, please ask to your mail provider
MailServerPort = "25" ' Your smtp mail server port (default: 25).
MailServerUser = "[email protected]" ' SMTP server username (Only for JMAil and ASPMail)
MailServerPass = "password" ' SMTP server password (Only for JMAil and ASPMail)
MailTo = "[email protected]" ' Don’t forget to change "[email protected]" to receive the mail from contact form
'MailYourCompany = "Your Company" ' To subject prefix (Ex. Subject: Your Company - Sender Subject)
MailComponent = "CDO.Message" ' JMail > JMail.Message / Persist AspMail > Persits.MailSender / CDO.Message > CDO.Message

'Request form fields
Dim MailFrom, MailFName, MailLName, MailCompany, MailWebsite, MailCountry, MailSubject, MailMessage
MailFrom = Trim(Request.Form("email_field"))
MailFName = Trim(Request.Form("fname_field"))
MailLName = Trim(Request.Form("lname_field"))
MailCompany = Trim(Request.Form("company_field"))
MailWebSite = Trim(Request.Form("website_field"))
MailCountry = Trim(Request.Form("country_field"))
MailSubject = Trim(Request.Form("subject_field"))
MailMessage = Trim(Request.Form("message_field"))
MailSettore = Trim(Request.Form("settore_field"))
MailIndirizzo = Trim(Request.Form("indirizzo_field"))
MailVia = Trim(Request.Form("via_field"))
MailCap = Trim(Request.Form("cap_field"))
MailNazione = Trim(Request.Form("nazione_field"))
MailTelefono = Trim(Request.Form("telefono_field"))
MailFax = Trim(Request.Form("fax_field"))
MailRadio01 = Trim(Request.Form("radio01_field"))
MailRadio02 = Trim(Request.Form("radio02_field"))
MailRadio03 = Trim(Request.Form("radio03_field"))
MailRadio04 = Trim(Request.Form("radio04_field"))
MailSenderIP = Request.ServerVariables("REMOTE_ADDR")

'Email Body Message Format
Dim MailBody
'Start Message Style
'Text Color : #939393
'Title Mouse Over : #D1F3FF
'Content Mouse Over : #EBFAFF
MailBody = MailBody & "<html>" & Vbcr
MailBody = MailBody & "<style>" & Vbcr
MailBody = MailBody & "/* " & Vbcr
MailBody = MailBody & " smooth taste table styles" & Vbcr
MailBody = MailBody & " written by Thomas Opp http://www.yaway.de" & Vbcr
MailBody = MailBody & "*/" & Vbcr
MailBody = MailBody & "table {" & Vbcr
MailBody = MailBody & " border-collapse: collapse;" & Vbcr
MailBody = MailBody & " border: 1px solid #38160C;" & Vbcr
MailBody = MailBody & " font: normal 11px verdana, arial, helvetica, sans-serif;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " background: #FFFFFF;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "td, th {" & Vbcr
MailBody = MailBody & " border: 1px dashed #B85A7C;" & Vbcr
MailBody = MailBody & " padding: .8em;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "thead th, tfoot th {" & Vbcr
MailBody = MailBody & " font: bold 11px verdana, arial, helvetica, sans-serif;" & Vbcr
MailBody = MailBody & " border: 1px solid #A85070;" & Vbcr
MailBody = MailBody & " text-align: left;" & Vbcr
MailBody = MailBody & " background: #38160C;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " padding-top:6px;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody td a {" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " text-decoration: none;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody td a:hover {" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " color: #FFFFFF;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody th a {" & Vbcr
MailBody = MailBody & " font: normal 11px verdana, arial, helvetica, sans-serif;" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " text-decoration: none;" & Vbcr
MailBody = MailBody & " font-weight:normal;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody th a:hover {" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " color: #FFFFFF;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody th, tbody td {" & Vbcr
MailBody = MailBody & " vertical-align: top;" & Vbcr
MailBody = MailBody & " text-align: left;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tfoot td {" & Vbcr
MailBody = MailBody & " border: 1px solid #38160C;" & Vbcr
MailBody = MailBody & " background: #38160C;" & Vbcr
MailBody = MailBody & " padding-top:6px;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & ".odd {" & Vbcr
MailBody = MailBody & " background: #469ABD;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody tr:hover {" & Vbcr
MailBody = MailBody & " background: #EBFAFF;" & Vbcr ' Content mouse over color
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody tr:hover th," & Vbcr
MailBody = MailBody & "tbody tr.odd:hover th {" & Vbcr
MailBody = MailBody & " background: #D1F3FF;" & Vbcr ' Title mouse over color
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & " </style>" & Vbcr
'End Message Style
'Start Message Content
MailBody = MailBody & "<body id=""home"">" & Vbcr
MailBody = MailBody & "<table width=""707"">" & Vbcr
MailBody = MailBody & " <tfoot>" & Vbcr
MailBody = MailBody & " </tfoot>" & Vbcr
MailBody = MailBody & " <tbody>" & Vbcr
MailBody = MailBody & " <tr >" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Nome</th>" & Vbcr
MailBody = MailBody & " <td width=""224"">" & MailFName & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Cognome</th>" & Vbcr
MailBody = MailBody & " <td width=""170"">" & MailLName & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">E-Mail</th>" & Vbcr
MailBody = MailBody & " <td>" & MailFrom & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Azienda</th>" & Vbcr
MailBody = MailBody & " <td>" & MailCompany & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Web Site</th>" & Vbcr
MailBody = MailBody & " <td>" & MailWebsite & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Indirizzo IP</th>" & Vbcr
MailBody = MailBody & " <td>" & MailSenderIP & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Provincia</th>" & Vbcr
MailBody = MailBody & " <td>" & MailCountry & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row""></th>" & Vbcr
MailBody = MailBody & " <td></td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Mansione</th>" & Vbcr
'MailBody = MailBody & " <td colspan=""3"">" & MailYourCompany & " - " & MailSubject & "</td>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailSubject & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Informazioni aggiuntive</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailMessage & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Settore attività</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailSettore & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Indirizzo</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailIndirizzo & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Numero</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailVia & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">CAP</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailCap & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Nazione</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailNazione & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Telefono</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailTelefono & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Fax</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailFax & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Settore Interesse</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailRadio01 & "</td>" & Vbcr

MailBody = MailBody & " " & Vbcr
MailBody = MailBody & " </tbody>" & Vbcr
MailBody = MailBody & "</table>" & Vbcr
MailBody = MailBody & "</body>" & Vbcr
MailBody = MailBody & "</html>" & Vbcr
'End Message Content

'For JMail Mail Component
on error resume next

if MailComponent="JMail.Message" then
Set JMail=Server.CreateObject("JMail.Message")
JMail.Charset=MailCharset
JMail.ContentType = "text/html" 'HTML Message Format
'JMail.ContentType = "text/plain"
JMail.From = MailServer
AddRecipient=MailTo
JMail.Subject = MailSubject
JMail.Body = MailBody
JMail.MailServerUserName = MailServerUser
JMail.MailServerPassword = MailServerPass
JMail.Send MailServer
Set JMail=Nothing

'For Persist ASPMail Mail Component
elseif MailComponent="Persits.MailSender" then
Set AspEmail = Server.CreateObject("Persits.MailSender")
AspEmail.Host = MailServer 'Required
AspEMail.Port = MailPort 'Optional. Port is 25 by default
AspEmail.Username = MailServerUser
AspEmail.Password = MailServerPass
AspEmail.From = MailServer 'Required
AspEMail.FromName = MailFName & MailLName
AspEMail.AddAddress=MailTo
AspEmail.Subject = MailSubject
AspEmail.Body = MailBody
AspEmail.IsHTML = true 'HTML Message Format
AspEmail.Charset = BBSxpCharset
AspEmail.Send
Set AspEmail=Nothing

'For CDO.Message Mail Component
elseif MailComponent="CDO.Message" then
Set CDO = CreateObject("CDO.Message")
With CDO
.To = MailTo
.From = MailFrom
.Subject = MailCompany
.HTMLBody = MailBody 'HTML Message Format
.Send
End With
end If

If Err Then Response.Write "The messages cannot sent to "&MailTo&"! Server Response: " & Err.Description & "<br>"
On Error GoTo 0

%>
 
Ti spiego...

Questo ti fa capire quanto mastico di ASP :)
Ecco il codice completo.


<%

**QUA CI SONO I SETTAGGI VARI

'Variables
Dim MailCharset, MailServer, MailServerUser, MailServerPass, MailTo, MailComponent
MailCharset = "ISO-8859-9" ' Mail message charset
MailServer = "mail.server.net" ' Your smtp mail server (Only for JMAil and ASPMail). If you don't known, please ask to your mail provider
MailServerPort = "25" ' Your smtp mail server port (default: 25).
MailServerUser = "[email protected]" ' SMTP server username (Only for JMAil and ASPMail)
MailServerPass = "password" ' SMTP server password (Only for JMAil and ASPMail)
MailTo = "[email protected]" ' Don’t forget to change "[email protected]" to receive the mail from contact form
'MailYourCompany = "Your Company" ' To subject prefix (Ex. Subject: Your Company - Sender Subject)
MailComponent = "CDO.Message" ' JMail > JMail.Message / Persist AspMail > Persits.MailSender / CDO.Message > CDO.Message

**QUA VENGONO, TRAMITE IL REQUEST RECUPERATI I CAMPI COMPILATI

'Request form fields
Dim MailFrom, MailFName, MailLName, MailCompany, MailWebsite, MailCountry, MailSubject, MailMessage
MailFrom = Trim(Request.Form("email_field"))
MailFName = Trim(Request.Form("fname_field"))
MailLName = Trim(Request.Form("lname_field"))
MailCompany = Trim(Request.Form("company_field"))
MailWebSite = Trim(Request.Form("website_field"))
MailCountry = Trim(Request.Form("country_field"))
MailSubject = Trim(Request.Form("subject_field"))
MailMessage = Trim(Request.Form("message_field"))
MailSettore = Trim(Request.Form("settore_field"))
MailIndirizzo = Trim(Request.Form("indirizzo_field"))
MailVia = Trim(Request.Form("via_field"))
MailCap = Trim(Request.Form("cap_field"))
MailNazione = Trim(Request.Form("nazione_field"))
MailTelefono = Trim(Request.Form("telefono_field"))
MailFax = Trim(Request.Form("fax_field"))
MailRadio01 = Trim(Request.Form("radio01_field"))
MailRadio02 = Trim(Request.Form("radio02_field"))
MailRadio03 = Trim(Request.Form("radio03_field"))
MailRadio04 = Trim(Request.Form("radio04_field"))
MailSenderIP = Request.ServerVariables("REMOTE_ADDR")

**QUA VI SONO LE IMPOSTAZIONI CSS DELLA MAIL

'Email Body Message Format
Dim MailBody
'Start Message Style
'Text Color : #939393
'Title Mouse Over : #D1F3FF
'Content Mouse Over : #EBFAFF
MailBody = MailBody & "<html>" & Vbcr
MailBody = MailBody & "<style>" & Vbcr
MailBody = MailBody & "/* " & Vbcr
MailBody = MailBody & " smooth taste table styles" & Vbcr
MailBody = MailBody & " written by Thomas Opp http://www.yaway.de" & Vbcr
MailBody = MailBody & "*/" & Vbcr
MailBody = MailBody & "table {" & Vbcr
MailBody = MailBody & " border-collapse: collapse;" & Vbcr
MailBody = MailBody & " border: 1px solid #38160C;" & Vbcr
MailBody = MailBody & " font: normal 11px verdana, arial, helvetica, sans-serif;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " background: #FFFFFF;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "td, th {" & Vbcr
MailBody = MailBody & " border: 1px dashed #B85A7C;" & Vbcr
MailBody = MailBody & " padding: .8em;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "thead th, tfoot th {" & Vbcr
MailBody = MailBody & " font: bold 11px verdana, arial, helvetica, sans-serif;" & Vbcr
MailBody = MailBody & " border: 1px solid #A85070;" & Vbcr
MailBody = MailBody & " text-align: left;" & Vbcr
MailBody = MailBody & " background: #38160C;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " padding-top:6px;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody td a {" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " text-decoration: none;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody td a:hover {" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " color: #FFFFFF;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody th a {" & Vbcr
MailBody = MailBody & " font: normal 11px verdana, arial, helvetica, sans-serif;" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " text-decoration: none;" & Vbcr
MailBody = MailBody & " font-weight:normal;" & Vbcr
MailBody = MailBody & " color: #939393;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody th a:hover {" & Vbcr
MailBody = MailBody & " background: transparent;" & Vbcr
MailBody = MailBody & " color: #FFFFFF;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody th, tbody td {" & Vbcr
MailBody = MailBody & " vertical-align: top;" & Vbcr
MailBody = MailBody & " text-align: left;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tfoot td {" & Vbcr
MailBody = MailBody & " border: 1px solid #38160C;" & Vbcr
MailBody = MailBody & " background: #38160C;" & Vbcr
MailBody = MailBody & " padding-top:6px;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & ".odd {" & Vbcr
MailBody = MailBody & " background: #469ABD;" & Vbcr
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody tr:hover {" & Vbcr
MailBody = MailBody & " background: #EBFAFF;" & Vbcr ' Content mouse over color
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & "tbody tr:hover th," & Vbcr
MailBody = MailBody & "tbody tr.odd:hover th {" & Vbcr
MailBody = MailBody & " background: #D1F3FF;" & Vbcr ' Title mouse over color
MailBody = MailBody & " }" & Vbcr
MailBody = MailBody & " </style>" & Vbcr
'End Message Style

**QUA TROVI IL CORPO DELLA MAIL, OVVERO I CAMPI COMPILATI DAL VISITATORE CHE TI ARRIVANO

'Start Message Content
MailBody = MailBody & "<body id=""home"">" & Vbcr
MailBody = MailBody & "<table width=""707"">" & Vbcr
MailBody = MailBody & " <tfoot>" & Vbcr
MailBody = MailBody & " </tfoot>" & Vbcr
MailBody = MailBody & " <tbody>" & Vbcr
MailBody = MailBody & " <tr >" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Nome</th>" & Vbcr
MailBody = MailBody & " <td width=""224"">" & MailFName & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Cognome</th>" & Vbcr
MailBody = MailBody & " <td width=""170"">" & MailLName & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">E-Mail</th>" & Vbcr
MailBody = MailBody & " <td>" & MailFrom & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Azienda</th>" & Vbcr
MailBody = MailBody & " <td>" & MailCompany & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Web Site</th>" & Vbcr
MailBody = MailBody & " <td>" & MailWebsite & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Indirizzo IP</th>" & Vbcr
MailBody = MailBody & " <td>" & MailSenderIP & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Provincia</th>" & Vbcr
MailBody = MailBody & " <td>" & MailCountry & "</td>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row""></th>" & Vbcr
MailBody = MailBody & " <td></td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Mansione</th>" & Vbcr
'MailBody = MailBody & " <td colspan=""3"">" & MailYourCompany & " - " & MailSubject & "</td>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailSubject & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Informazioni aggiuntive</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailMessage & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Settore attività</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailSettore & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Indirizzo</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailIndirizzo & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Numero</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailVia & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">CAP</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailCap & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Nazione</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailNazione & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Telefono</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailTelefono & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Fax</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailFax & "</td>" & Vbcr
MailBody = MailBody & " </tr>" & Vbcr
MailBody = MailBody & " <tr>" & Vbcr
MailBody = MailBody & " <th width=""143"" scope=""row"">Settore Interesse</th>" & Vbcr
MailBody = MailBody & " <td colspan=""3"">" & MailRadio01 & "</td>" & Vbcr

MailBody = MailBody & " " & Vbcr
MailBody = MailBody & " </tbody>" & Vbcr
MailBody = MailBody & "</table>" & Vbcr
MailBody = MailBody & "</body>" & Vbcr
MailBody = MailBody & "</html>" & Vbcr
'End Message Content

'For JMail Mail Component
on error resume next

**QUA, A SECONDO DEL SISTEMA DI TRASMISSIONE VI è LA SPEDIZIONE VERA E PROPRIA

if MailComponent="JMail.Message" then
Set JMail=Server.CreateObject("JMail.Message")
JMail.Charset=MailCharset
JMail.ContentType = "text/html" 'HTML Message Format
'JMail.ContentType = "text/plain"
JMail.From = MailServer
AddRecipient=MailTo
JMail.Subject = MailSubject
JMail.Body = MailBody
JMail.MailServerUserName = MailServerUser
JMail.MailServerPassword = MailServerPass
JMail.Send MailServer
Set JMail=Nothing

'For Persist ASPMail Mail Component
elseif MailComponent="Persits.MailSender" then
Set AspEmail = Server.CreateObject("Persits.MailSender")
AspEmail.Host = MailServer 'Required
AspEMail.Port = MailPort 'Optional. Port is 25 by default
AspEmail.Username = MailServerUser
AspEmail.Password = MailServerPass
AspEmail.From = MailServer 'Required
AspEMail.FromName = MailFName & MailLName
AspEMail.AddAddress=MailTo
AspEmail.Subject = MailSubject
AspEmail.Body = MailBody
AspEmail.IsHTML = true 'HTML Message Format
AspEmail.Charset = BBSxpCharset
AspEmail.Send
Set AspEmail=Nothing

'For CDO.Message Mail Component
elseif MailComponent="CDO.Message" then
Set CDO = CreateObject("CDO.Message")
With CDO
.To = MailTo
.From = MailFrom
.Subject = MailCompany
.HTMLBody = MailBody 'HTML Message Format
.Send
End With
end If

If Err Then Response.Write "The messages cannot sent to "&MailTo&"! Server Response: " & Err.Description & "<br>"
On Error GoTo 0

%>

FINE,
come vedi non ci sono controlli, probabilmente sono nell'interfaccia flash o hai qualche javascript.
Inviami anche la parte HTML.
Byeee
 
GRAZIE! Ecco il codice nel flash, in fondo c'è la parte che credo cercavi... 'All Fields Required':


// Variables and Settings
stop();
error_message._alpha = 0;
System.useCodepage = true;
send_button.onRelease = function() {
ceform_vars = new LoadVars();
ceform_vars.fname_field = fname_field.text;
ceform_vars.lname_field = lname_field.text;
ceform_vars.email_field = email_field.text;
ceform_vars.company_field = company_field.text;
ceform_vars.website_field = website_field.text;
ceform_vars.country_field = country_field.text;
ceform_vars.subject_field = subject_field.text;
ceform_vars.message_field = message_field.text;
ceform_vars.settore_field = settore_field.text;
ceform_vars.indirizzo_field = indirizzo_field.text;
ceform_vars.via_field = via_field.text;
ceform_vars.cap_field = cap_field.text;
ceform_vars.nazione_field = nazione_field.text;
ceform_vars.telefono_field = telefono_field.text;
ceform_vars.fax_field = fax_field.text;
ceform_vars.radio01_field = radio01_field.text;
ceform_vars.radio02_field = radio02_field.text;
ceform_vars.radio03_field = radio03_field.text;
ceform_vars.radio04_field = radio04_field.text;

//Validating email
if (ceform_vars.email_field.indexOf("@") == -1 || ceform_vars.email_field.indexOf(".") == -1) {
// If email format is not valid, * text will appear:
email_validation.text = "*";
return false;
}

// If text fields are not blank the message will be sent
else if (ceform_vars.fname_field != "" and ceform_vars.lname_field != "" and ceform_vars.email_field != "" and ceform_vars.company_field != "" and ceform_vars.website_field != "" and ceform_vars.country_field != "" and ceform_vars.subject_field != "" and ceform_vars.message_field != "") {
ceform_vars.sendAndLoad("send_form.asp", ceform_vars, "POST");
gotoAndStop(21);

// Else if text fields are blank a warning message will appear
} else {
error_message._alpha = 100;
}

// After the message is sent the user will be redirected to frame 3
ceform_vars.onLoad = function() {
gotoAndPlay(30);
};
};

// If you click on another field “All Fields Required” will dissapear
fname_field.onSetFocus = lname_field.onSetFocus = email_field.onSetFocus = company_field.onSetFocus = website_field.onSetFocus = country_field.onSetFocus = subject_field.onSetFocus = message_field.onSetFocus = function () {
if (error_message._alpha != 0) {
error_message._alpha = 0;
}
};
 
GRAZIE! Ecco il codice nel flash, in fondo c'è la parte che credo cercavi... 'All Fields Required':


// Variables and Settings
stop();
error_message._alpha = 0;
System.useCodepage = true;
send_button.onRelease = function() {
ceform_vars = new LoadVars();
ceform_vars.fname_field = fname_field.text;
ceform_vars.lname_field = lname_field.text;
ceform_vars.email_field = email_field.text;
ceform_vars.company_field = company_field.text;
ceform_vars.website_field = website_field.text;
ceform_vars.country_field = country_field.text;
ceform_vars.subject_field = subject_field.text;
ceform_vars.message_field = message_field.text;
ceform_vars.settore_field = settore_field.text;
ceform_vars.indirizzo_field = indirizzo_field.text;
ceform_vars.via_field = via_field.text;
ceform_vars.cap_field = cap_field.text;
ceform_vars.nazione_field = nazione_field.text;
ceform_vars.telefono_field = telefono_field.text;
ceform_vars.fax_field = fax_field.text;
ceform_vars.radio01_field = radio01_field.text;
ceform_vars.radio02_field = radio02_field.text;
ceform_vars.radio03_field = radio03_field.text;
ceform_vars.radio04_field = radio04_field.text;

COMMENTA IL CODICE CON LE DOPPIE BARRE = //

//Validating email
// if (ceform_vars.email_field.indexOf("@") == -1 || ceform_vars.email_field.indexOf(".") == -1) {
// If email format is not valid, * text will appear:
// email_validation.text = "*";
// return false;
// }

// If text fields are not blank the message will be sent
// else if (ceform_vars.fname_field != "" and ceform_vars.lname_field != "" and ceform_vars.email_field != "" and ceform_vars.company_field != "" and ceform_vars.website_field != "" and ceform_vars.country_field != "" and ceform_vars.subject_field != "" and ceform_vars.message_field != "") {
// ceform_vars.sendAndLoad("send_form.asp", ceform_vars, "POST");
// gotoAndStop(21);

// Else if text fields are blank a warning message will appear
// } else {
// error_message._alpha = 100;
// }

// After the message is sent the user will be redirected to frame 3
// ceform_vars.onLoad = function() {
// gotoAndPlay(30);
// };
// };

// If you click on another field “All Fields Required” will dissapear
// fname_field.onSetFocus = lname_field.onSetFocus = email_field.onSetFocus = company_field.onSetFocus = website_field.onSetFocus = country_field.onSetFocus = subject_field.onSetFocus = message_field.onSetFocus = function () {
// if (error_message._alpha != 0) {
// error_message._alpha = 0;
// }
// };

prova così
 

Discussioni simili