|
| HOMEPAGE | INDICE FORUM | REGOLAMENTO | ::. | NEI PREFERITI | .:: | RSS Forum | RSS News | NEWS web | NEWS software | |
| PUBBLICITA' | | | ARTICOLI | WIN XP | VISTA | WIN 7 | REGISTRI | SOFTWARE | MANUALI | RECENSIONI | LINUX | HUMOR | HARDWARE | DOWNLOAD | | | CERCA nel FORUM » | |
![]() |
#1 |
Newbie
Registrato: 21-08-2002
Messaggi: 14
![]() |
[JSP] Aiuto form email
Ho questo form in javascript <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=windows-1252"> <title>Form</title> <script language="Javascript"> <!-- function Email() { var dest_email = document.modulo.dest_email.value; var mitt_nome = document.modulo.mitt_nome.value; var mitt_sesso = document.modulo.mitt_sesso.value; var mitt_età = document.modulo.mitt_età.value; var mitt_email = document.modulo.mitt_email.value; var mitt_tel = document.modulo.mitt_tel.value; var oggetto = document.modulo.oggetto.value; var messaggio = document.modulo.msg.value; if ((mitt_nome == "") || (mitt_nome == "undefined")) { alert("Inserire nome."); document.modulo.mitt_nome.focus(); } else if ((mitt_sesso == "") || (mitt_sesso == "undefined")) { alert("Specificare il sesso."); document.modulo.mitt_sesso.focus(); } else if ((mitt_età == "") || (mitt_età == "undefined")) { alert("Specificare l'età."); document.modulo.mitt_età.focus(); } else if ((mitt_email.indexOf("@") == (-1)) || (mitt_email == "") || (mitt_email == "undefined")) { alert("Inserire un indirizzo email valido."); document.modulo.mitt_email.focus(); } else if ((mitt_tel == "") || (mitt_tel == "undefined")) { alert("Inserire numero di telefono."); document.modulo.mitt_tel.focus(); } else if ((oggetto == "") || (oggetto == "undefined")) { alert("Inserire un oggetto."); document.modulo.oggetto.focus(); } else if ((messaggio == "") || (messaggio == "undefined")) { alert("Inserire un messaggio."); document.modulo.messaggio.focus(); } else { location.href = "mailto:" + dest_email + "?Subject=" + oggetto + "&Body=Messaggio: " + messaggio + "%0aMittente: " + mitt_nome + "%0aSesso: " + mitt_sesso + "%0aEtà: " + mitt_età + "%0atel: " + mitt_tel; } } //--> </script> </head> <body> <form name="modulo"> <input type="hidden" name="dest_email" value="miaemail@miosito.com"> <table> <tr><td valign="top">Nome:</td><td><input type="text" name="mitt_nome" size="20"></td></tr> <tr><td valign="top">Sesso:</td><td><input type=radio name="mitt_sesso" value="Uomo">Uomo - <input type=radio name="mitt_sesso" value="Donna">Donna</td></tr> <tr><td valign="top">Età:</td><td><input type=radio name="mitt_età" value="14/18">14/18 - <input type=radio name="mitt_età" value="19/24">19/25 - <input type=radio name="mitt_età" value="Oltre 25">Oltre 25</td></tr> <tr><td valign="top">eMail:</td><td><input type="text" name="mitt_email" size="20"></td></tr> <tr><td valign="top">Telefono:</td><td><input type="text" name="mitt_tel" size="20"></td></tr> <tr><td valign="top">Oggetto:</td><td><input type="text" name="oggetto" size="20"></td></tr> <tr><td valign="top">Messaggio:</td><td><textarea name="msg" rows="5" cols="30"></textarea></td></tr> <tr><td colspan="2" align="center"><input type="button" value="Invia" onClick="Email()"></td></tr> </table> </form> </body> </html> Praticamente nei campi sesso ed età come valore mi esce sempre "undefined" qualsiasi selezione io faccio. Dove sbaglio???? Grazie
___________________________________
(´¯'·.¸¸.·->Scorpions78<-·.¸¸.·´¯´) |
![]() |
![]() |
![]() |
#2 | ||
Senior Member
Registrato: 21-03-2008
Loc.: From Lugano (CH)...finally!
Messaggi: 330
![]() |
Invece di queste due righe
Quota:
Quota:
|
||
![]() |
![]() |
![]() |
Utenti attualmente attivi che stanno leggendo questa discussione: 1 (0 utenti e 1 ospiti) | |
|
|
![]() |
||||
Discussione | Autore discussione | Forum | Risposte | Ultimo messaggio |
AIUTO! EMAIL INDESIDERATE IBOX DI TIM. | rmarella | Sicurezza&Privacy | 14 | 02-09-2008 09.50.41 |
[JSP] Usare form da una JSP inclusa... si può fare? | Alhazred | Programmazione | 8 | 29-07-2008 10.31.48 |
Cancellato archivio email di Outlook:chiedo disperamente aiuto ! | Curioso | Software applicativo | 6 | 22-12-2006 08.32.17 |
[PHP] form invio dati via email, formattati | Thor | Programmazione | 0 | 06-07-2005 18.06.30 |
indirizzi email, aiuto | bluman | Windows 7/Vista/XP/ 2003 | 3 | 19-07-2004 12.30.21 |