|
| 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 » | |
09-04-2009, 13.09.17 | #1 |
Guest
Messaggi: n/a
|
javascript mail-form
function Email() { var dest_email = document.modulo.dest_email.value; var mitt_email = document.modulo.mitt_email.value; var mitt_tel = document.modulo.mitt_tel.value; var mitt_nome = document.modulo.mitt_nome.value; var oggetto = document.modulo.obj.value; var messaggio = document.modulo.msg.value; if ((mitt_nome == "") || (mitt_nome == "undefined")) { alert("Inserire nome."); document.modulo.mitt_nome.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 ((obj == "") || (obj == "undefined")) { alert("Inserire un oggetto."); document.modulo.obj.focus(); } else if ((messaggio == "") || (messaggio == "undefined")) { alert("Inserire un messaggio."); document.modulo.msg.focus(); } else { location.href = "mailto:" + dest_email + "?Subject=" + obj + "&Body=messaggio: " + msg + " [ mittente: " + mitt_nome + " , " + mitt_email + " , tel:" + mitt_tel + " ]"; } } __________________________________________________ _______________ Mentre la form è questa: <form name="modulo"> <input type="hidden" name="dest_email" value="fake@mail.it"> <table height="335" width="589" style="font-size:12px; font-weight:bold" id="table1"> <tr> <td valign="top" width="137" align="right">Nome:</td> <td width="442"><input type="text" name="mitt_nome" size="29"></td> </tr> <tr> <td valign="top" width="137" align="right">e-Mail:</td> <td width="442"><input type="text" name="mitt_email" size="29"></td> </tr> <tr> <td valign="top" width="137" align="right">Telefono:</td> <td width="442"><input type="text" name="mitt_tel" size="29"></td> </tr> <tr> <td valign="top" width="137" align="right">Oggetto:</td> <td width="442"><input type="text" name="obj" size="29"></td> </tr> <tr> <td valign="top" width="137" align="right">Messaggio:</td> <td valign="top" width="442"> <textarea name="msg" rows="11" cols="52"></textarea></td> </tr> <tr> <td colspan="2" align="center" height="28"> <input type="reset" value=" Reset "> <input type="submit" value=" Send " onclick="Email()"> </td> </tr> </table> </form> Qualcuno saprebbe dirmi, per favore, cosa c'é che non va? Grazie. Ciao. |
09-04-2009, 14.29.52 | #2 |
Made in Japan
Top Poster
Registrato: 04-07-2001
Messaggi: 4.461
|
location.href = "mailto:" + dest_email + "?Subject=" + obj +
"&Body=messaggio: " + msg + " [ mittente: " + mitt_nome + " , " + mitt_email + " , tel:" + mitt_tel + " ]"; così ad occhio direi che il codice javascript obj ed msg non si sa chi sono. |
Utenti attualmente attivi che stanno leggendo questa discussione: 1 (0 utenti e 1 ospiti) | |
Strumenti discussione | |
|
|
Discussioni simili | ||||
Discussione | Autore discussione | Forum | Risposte | Ultimo messaggio |
[JSP] Usare form da una JSP inclusa... si può fare? | Alhazred | Programmazione | 8 | 29-07-2008 11.31.48 |
javascript: inviare un form con pulsante testuale in frame | gepngepin | Programmazione | 0 | 11-01-2008 12.50.55 |
Form Send Mail | Giuseppe73 | Programmazione | 1 | 20-12-2005 13.22.15 |
Form per inviare mail con script | Puffas | Programmazione | 5 | 07-09-2003 01.39.26 |