Problema richiamare funzione

Fabi2089

Utente Attivo
7 Lug 2008
73
0
0
Salve a tutti,
ho un piccolo problemino... tramite una funzione javascript sto controllando un form solo che quando clicco sul pulsante è come se la funzione non venisse richiamata..

vi allego il codice..

<%@Language = VBScript%>
<html>
<head>
<title>BLA BLA</title>
<link href="css.css" rel="stylesheet" type="text/css">

<script language="javascript">
<!--
function Modulo() {
var Nome = document.modulo.nome.value;
var Cognome = document.modulo.txtCognome.value;
var Fiscale = document.modulo.txtFiscale.value;
var Indirizzo = document.modulo.txtIndirizzo.value;
var Numero = document.modulo.txtNumero.value;
var Citta = document.modulo.txtCitta.value;
var CAP = document.modulo.txtCAP.value;
var Paese = document.modulo.paese.options[document.modulo.paese.selectedIndex].value;
var Nascita = document.modulo.txtDataNascita.value;
var Tel = document.modulo.txtTel.value;
var Mail = document.modulo.txtMail.value;
var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;


if ((Nome == "") || (Nome == "undefined")) {
alert("Il campo Nome è obbligatorio.");
document.modulo.txtNome.focus();
return false;
}
else if ((Cognome == "") || (Cognome == "undefined")) {
alert("Il campo Cognome è obbligatorio.");
document.modulo.txtCognome.focus();
return false;
}
else if ((Fiscale == "") || (Fiscale == "undefined")) {
alert("Il campo Codice Fiscale è obbligatorio.");
document.modulo.txtFiscale.focus();
return false;
}
else if ((Indirizzo == "") || (Indirizzo == "undefined")) {
alert("Il campo Indirizzo è obbligatorio.");
document.modulo.txtIndirizzo.focus();
return false;
}
else if ((isNaN(Numero)) || (Numero == "") || (Numero == "undefined")) {
alert("Il campo Numero è numerico ed obbligatorio.");
document.modulo.txtNumero.value = "";
document.modulo.txtNumero.focus();
return false;
}
else if ((Citta == "") || (Citta == "undefined")) {
alert("Il campo Codice Fiscale è obbligatorio.");
document.modulo.txtFiscale.focus();
return false;
}
else if ((isNaN(CAP)) || (CAP == "") || CAP == "undefined")) {
alert("Il campo CAP è numerico ed obbligatorio.");
document.modulo.txtCAP.value = "";
document.modulo.txtCAP.focus();
return false;
}
else if ((Paese == "") || (Paese == "undefined")) {
alert("Il campo Paese è obbligatorio.");
document.modulo.paese.focus();
return false;
}
else if (document.modulo.txtDataNascita.value.substring(2,3) != "/" ||
document.modulo.txtDataNascita.value.substring(5,6) != "/" ||
isNaN(document.modulo.txtDataNascita.value.substring(0,2)) ||
isNaN(document.modulo.txtDataNascita.value.substring(3,5)) ||
isNaN(document.modulo.txtDataNascita.value.substring(6,10))) {
alert("Inserire nascita in formato gg/mm/aaaa");
document.modulo.txtDataNascita.value = "";
document.modulo.txtDataNascita.focus();
return false;
}
else if (document.modulo.txtDataNascita.value.substring(0,2) > 31) {
alert("Impossibile utilizzare un valore superiore a 31 per i giorni");
document.modulo.txtDataNascita.select();
return false;
}
else if (document.modulo.txtDataNascita.value.substring(3,5) > 12) {
alert("Impossibile utilizzare un valore superiore a 12 per i mesi");
document.modulo.txtDataNascita.value = "";
document.modulo.txtDataNascita.focus();
return false;
}
else if (document.modulo.nascita.value.substring(6,10) < 1900) {
alert("Impossibile utilizzare un valore inferiore a 1900 per l'anno");
document.modulo.txtDataNascita.value = "";
document.modulo.txtDataNascita.focus();
return false;
}
else if ((isNaN(Tel)) || (Tel == "") || (Tel == "undefined")) {
alert("Il campo Telefono è numerico ed obbligatorio.");
document.modulo.txtTel.value = "";
document.modulo.txtTel.focus();
return false;
}
else if (!email_reg_exp.test(Mail) || (Mail == "") || (Mail == "undefined")) {
alert("Inserire un indirizzo e-mail corretto.");
document.modulo.txtMail.select();
return false;
}
else {
document.modulo.action = "daticonferma.asp";
document.modulo.submit();
}

}
//-->
</script>

</head>

<body>

<div id="header">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="1280" height="174" id="header" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="header.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#4c0b11" /><embed src="header.swf" quality="high" bgcolor="#4c0b11" width="1280" height="174" name="header" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object>
</div>

<div id="menu" align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="765" height="26" id="menu" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="menu.swf" /><param name="quality" value="high" /><param name="bgcolor" value="#000000" /><embed src="menu.swf" quality="high" bgcolor="#000000" width="765" height="26" name="menu" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</div>

<div id="dati">
<table id="tablecolor4">
<tr>
<td colspan="2">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="700" height="100" id="menucommerce_dati" align="middle">
<param name="allowScriptAccess" value="sameDomain" />
<param name="movie" value="menucommerce_dati.swf" /><param name="quality" value="best" /><param name="bgcolor" value="#000000" /><embed src="menucommerce_dati.swf" quality="best" bgcolor="#000000" width="700" height="100" name="menucommerce_dati" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" />
</object>
</td>
</tr>
</table>

<form method="POST" name="modulo">
<table id="tablecolor3">
<tr>
<td>
<table id="tablecolor3">
<tr>
<td width="90px" align="right">Nome:</td>
<td><input type="text" name="nome" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">Cognome:</td>
<td><input type="text" name="txtCognome" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">Codice fiscale:</td>
<td><input type="text" name="txtFiscale" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">Indirizzo:</td>
<td><input type="text" name="txtIndirizzo" style="width:120px; height:18px; font-size:8pt; font-family:Tahoma; border-width:1px; border-color:#de1a1a; border-style:solid;"> N.ro: <input type="text" name="txtIndirizzoNumero" id="Nome" maxlength="35" value="" style="width:24px; height:18px; font-size:8pt; font-family:Tahoma; border-width:1px; border-color:#de1a1a; border-style:solid;"></td>
</tr>

<tr>
<td width="90px" align="right">Città:</td>
<td><input type="text" name="txtCitta" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">CAP:</td>
<td><input type="text" name="txtCAP" class="cap"></td>
</tr>

<tr>
<td width="90px" align="right">Paese:</td>
<td>
<SELECT size=1 cols=5 NAME="Paesi" class="paesi">
<OPTION Value=nessuna></option>
<OPTION value="Italia"> Italia</option>
<OPTION value="Germania"> Germania</option>
<OPTION Value="Inghilterra"> Inghilterra</option>
<OPTION Value="Stati Uniti"> Stati Uniti</option>
<OPTION Value="Francia"> Francia</option>
<OPTION Value="Spagna"> Spagna</option>
</select>
</td>
</tr>

<tr>
<td width="90px" align="right">Data di nascita:</td>
<td><input type="text" name="txtDataNascita" maxlength="35" value="" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">Telefono:</td>
<td><input type="text" name="txtTel" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">Indirizzo e-mail:</td>
<td><input type="text" name="txtMail" class="testo"></td>
</tr>

<tr>
<td width="90px" align="right">Contratto:</td>
<td><input type="checkbox" name="" value=""/></td>
</tr>

<tr>
<td></td>
<td width="150px">* Tutti i campi sono obbligatori</td>
</tr>
</table>
</td>

</tr>
</table>

<table width="700px" height="23px" border="2px" bordercolor="#6C0013" frame="above" style="background-color:#920b0b; left:50%; position:absolute; margin-left:-350px;">
<tr><td></td></tr>
</table>

<table width="700px" style="left:50%; position:absolute; margin-left:-350px; margin-top:22px">
<tr>

<td align="left" width="175px">

</td>

<td width="175px">

</td>

<td width="175px">

</td>

<td align="right" width="175px">
<input type="image" name="invia" src="imgs/btnContinua.jpg" onClick="Modulo()">
</td>
</tr>
</form>
</table>


</div>
<script type="text/javascript" src="ieupdate.js"></script>
</body>
</html>
 
Discussioni simili
Autore Titolo Forum Risposte Data
P Problema per richiamare una variabile... PHP 3
L problema nel richiamare gli id HTML e CSS 2
P problema: dichiarare e richiamare variabili all'interno di una classe PHP 2
catellostefano Problema per richiamare file xml -- Warning: DOMDocument::load() [domdocument.load]: PHP 0
I Sto progettando nuovi siti utilizzando bootstrap e devo dire funziona bene, l'unico problema e la maschera -moz- HTML e CSS 0
K Problema form update PHP 2
O problema con dvr dahua xvr5116 IP Cam e Videosorveglianza 0
S Problema nel ciclare un json Javascript 0
G Problema con Xampp Web Server 1
andrea barletta Problema con miniature comandi Photoshop 0
I problema con alice Posta Elettronica 0
K Problema Inner join PHP 1
F firefox problema http Linux e Software 0
N Problema con position absolute e overflow HTML e CSS 4
E Problema jquery Success jQuery 2
L Problema con inner join PHP 11
K [php] Problema con inner join PHP 4
E problema selezione sfumata Photoshop 2
K [PHP] Problema con variabili concatenate. PHP 1
A Problema filtro fluidifica Photoshop Photoshop 1
H Problema Bordi Scontorno Photoshop 1
O problema con query PHP 4
R Problema installazione Realtek WiFi USB rtl8821 Reti LAN e Wireless 1
I problema con 2 account Posta Elettronica 1
L problema collegamento file css con html HTML e CSS 1
Y Problema percorso file in rete PHP 1
N Problema SEO "L'URL non si trova su Google" SEO e Posizionamento 4
E Problema accesso a file con app sviluppata con MIT APP INVENTOR 2 Sviluppo app per Android 0
P Problema acquisizione clienti Webdesign e Grafica 1
F NetBeans problema creazione progetto Java Windows e Software 0
M Problema con Try Catch PHP 0
C problema seo + cerco esperto SEO e Posizionamento 11
Sergio Unia Problema con gli eventi del mouse su una data table: Javascript 2
T PROBLEMA CON SESSIONI PHP 3
A Problema, non so, di scale() o transform, oppure altro? HTML e CSS 0
T ALTRO PROBLEMA CON ARRAY PHP PHP 1
R problema con else PHP 0
T PROBLEMA CON ARRAY PHP 8
L problema con query select PHP 2
R Problema query con ricerca id numerico PHP 2
F Problema con risposta PHP 0
S problema con recupero dati tabella mysql PHP 2
Z Problema con il mio tp-l i nk Reti LAN e Wireless 1
I PROBLEMA: Sostituzione sito XAMPP E-Commerce 0
T problema data 30/11/-1 PHP 0
L Problema RAM con Tomcat 8 Apache 0
napuleone problema con sort e asort PHP 4
Y Problema incolonnamento tabella PHP 7
S problema salvataggio immagini Photoshop 0
Z Problema con INT MySQL PHP 1

Discussioni simili