Visualizzazione dei risultati da 1 a 9 su 9
  1. #1

    inserimento box privacy

    Ciao

    ho una pagina contenente il modulo di registrazione...

    dopo tutti i campi del modulo, c'è la Normativa sulla privacy e una checkbox per il consenso...

    vorrei che fino a che l'utente non spunta la checkbox il bottone "INVIA" non deve essere attivo...

    come fare?

  2. #2
    Perchè apri una discussione al giorno sempre sullo stesso argomento?
    Ti abbiamo già spiegato come fare nelle 2 discussioni precedenti inerenti lo stesso argomento.

  3. #3

    scusa

    scusa ma perchè sei così polemico?

    non riuscivo più a trovare la "discussione" precedente ecco perchè ne ho aperta una nuova...

    poi non ho risolto qst problema

  4. #4

    scusa

    scusa ma perchè sei così polemico?

    non riuscivo più a trovare la "discussione" precedente ecco perchè ne ho aperta una nuova...

    poi non ho risolto qst problema

  5. #5

    aiutooo

    per favore avrei bisogno di aiuto...

  6. #6
    Esempio:
    form.html
    codice:
    <html>
    	<head>
    		<title>Titolo Pagina</title>
    	</head>
    	<body>
    		<form method="post" action="pagina.asp">
    		  
    
    <label for="nome">nome * </label> <input type="text" name="nome" id="nome" /></p>
    		  
    
    <label for="cognome">cognome </label> <input type="text" name="cognome" id="cognome" /></p>
    		  
    
    <label for="email">email * </label> <input type="text" name="email" id="email" /></p>
    		  
    
    <label for="legge">Legge sulla privacy</label><textarea cols="20" rows="5" name="legge" id="legge" readonly="readonly">Il Dlg eccetera, eccetera...</textarea></p>
    		  
    
    <label for="privacy">Accetto il trattamento dei dati * </label><input type="checkbox" name="privacy" id="privacy" value="1" /></p>
    		  
    
    <input type="submit" value="INVIA" /></p>
    		  
    
    I campi con asterisco * sono obbligatori.	
    		</form>
    	</body>
    </html>
    pagina.asp
    codice:
    <%
    erroreCampi = false
    nome = trim(request.form("nome"))
    cognome = trim(request.form("cognome"))
    email = trim(request.form("email"))
    privacy = trim(request.form("privacy"))
    messaggioErrore = "Attenzione:
    "
    
    if len(nome) = 0 then
    	erroreCampi = true
    	messaggioErrore = messaggioErrore & "Il campo nome &egrave; obbligatorio;
    "
    end if
    
    if len(email) = 0 then
    	erroreCampi = true
    	messaggioErrore = messaggioErrore & "Il campo email &egrave; obbligatorio;
    "
    end if
    
    if len(privacy) > 0 and isNumeric(privacy) then
    	privacy = cLng(privacy)
    else
    	privacy = 0
    end if
    
    if privacy <> 1 then
    	erroreCampi = true
    	messaggioErrore = messaggioErrore & "&Egrave; necessario accettare il trattamento dei dati;
    "
    end if
    
    if not erroreCampi then
    	' qui processi i dati presi dalla form a tuo piacimento
    end if
    %>
    <html>
    	<head>
    		<title>Titolo Pagina</title>
    	</head>
    	<body>
    		<% 
    			if erroreCampi then 
    				response.write messaggioErrore
    			else
    				response.write "Operazione eseguita."
    			end if
    		%>
    	</body>
    </html>
    Se non comprendi questo, la vedo dura...

  7. #7

    grazie

    ti ringrazio per la pazienza...

    ora ti posto il mio codice così vediamo un pò...

    <CODE>
    .
    .
    <SCRIPT LANGUAGE="JavaScript">
    <!-- Begin
    function resetform()
    {
    document.forms[0].elements[1]=="";
    }

    function submitForms()
    {
    if (isNome() && isCognome() && isNomeAzienda() && isCFPIVA() && isIndirizzo() && isCitta() && isCAP() && isProvincia() && isEmail() && isNumTel() && isNumFax() )
    if (confirm("Confermi?"))
    {
    alert("Invio in corso!");
    return true;
    }
    else
    {
    alert("Non hai confermato!");
    return false
    }
    else
    return false;
    }

    function isNome() {
    if (document.forms[0].elements[0].value == "")
    {
    alert ("Inserisci il nome.")
    document.forms[0].elements[0].focus();
    return false;
    }
    return true;
    }

    function isCognome() {
    if (document.forms[0].elements[1].value == "") {
    alert ("Inserisci il cognome ")
    document.forms[0].elements[1].focus();
    return false;
    }
    return true;
    }

    function isNomeAzienda() {
    if (document.forms[0].elements[2].value == "") {
    alert ("Inserisci il Nome dell'Azienda ")
    document.forms[0].elements[2].focus();
    return false;
    }
    return true;
    }

    function isCFPIVA() {
    if (document.forms[0].elements[3].value == "") {
    alert ("Inserisci il Codice Fiscale / Partita IVA")
    document.forms[0].elements[3].focus();
    return false;
    }
    return true;
    }

    function isIndirizzo() {
    if (document.forms[0].elements[4].value == "") {
    alert ("Inserisci l\'indirizzo")
    document.forms[0].elements[4].focus();
    return false;
    }
    return true;
    }

    function isCitta()
    {
    if (document.forms[0].elements[5].value == "")
    {
    alert ("Inserisci la città ")
    document.forms[0].elements[5].focus();
    return false;
    }
    return true;
    }

    function isCAP() {
    if (document.forms[0].elements[6].value == "") {
    alert ("Inserisci il CAP")
    document.forms[0].elements[6].focus();
    return false;
    }
    return true;
    }

    function isProvincia() {
    if (document.forms[0].elements[7].value == "") {
    alert ("Inserisci la Provincia")
    document.forms[0].elements[7].focus();
    return false;
    }
    return true;
    }

    function isEmail() {
    if (document.forms[0].elements[8].value == "") {
    alert ("Inserisci l'e-mail")
    document.forms[0].elements[8].focus();
    return false;
    }
    if (document.forms[0].elements[8].value.indexOf ('@',0) == -1 ||
    document.forms[0].elements[8].value.indexOf ('.',0) == -1) {
    alert ("E-mail non valida!")
    document.forms[0].elements[8].select();
    document.forms[0].elements[8].focus();
    return false;
    }
    return true;
    }

    function isNumTel() {
    if (document.forms[0].elements[9].value == "") {
    alert ("Inserisci il Numero di Telefono")
    document.forms[0].elements[9].focus();
    return false;
    }
    return true;
    }

    function isNumFax() {
    if (document.forms[0].elements[10].value == "") {
    alert ("Inserisci il Numero di FAX")
    document.forms[0].elements[10].focus();
    return false;
    }
    return true;
    }

    // End -->
    </SCRIPT>
    .
    .
    ...
    .
    .
    <form action="RegistrazioneEffettuata.asp" name="RegistraUtenti" target="_self" id="RegistraUtenti" enctype="text/plain" method="post" onSubmit="return submitForms()">
    <div class="testoRegistra">Nome</div>
    <div>
    <input name="Nome" type="text" id="Nome" tabindex="1" size="50" maxlength="50" />
    </div>
    <div class="testoRegistra">Cognome</div>
    <div>
    <input name="Cognome" type="text" id="Cognome" size="50" maxlength="50" />
    </div>
    <div class="testoRegistra">Nome Azienda</div>
    <div>
    <input name="NomeAzienda" type="text" id="NomeAzienda" size="50" maxlength="50" />
    </div>
    <div class="testoRegistra">C.F. / P.IVA</div>
    <div>
    <input name="CFPIVA" type="text" id="CFPIVA" size="16" maxlength="16" />
    </div>
    <div class="testoRegistra">Indirizzo</div>
    <div>
    <input name="Indirizzo" type="text" id="Indirizzo" size="50" maxlength="50" />
    </div>
    <div class="testoRegistra">Citt&agrave;</div>
    <div>
    <input name="Citta" type="text" id="Citta" size="50" maxlength="50" />
    </div>
    <div class="testoRegistra">CAP</div>
    <div>
    <input name="CAP" type="text" id="CAP" size="5" maxlength="5" />
    </div>
    <div class="testoRegistra">Prov</div>
    <div>
    <input name="Provincia" type="text" id="Provincia" size="2" maxlength="2" />
    </div>
    <div class="testoRegistra">E-mail</div>
    <div>
    <input name="Email" type="text" id="Email" size="50" maxlength="50" />
    </div>
    <div class="testoRegistra">Tel </div>
    <div>
    <input name="NumTel" type="text" id="NumTel" size="20" maxlength="20" />
    </div>
    <div class="testoRegistra">Fax</div>
    <div>
    <input name="NumFax" type="text" id="NumFax" size="20" maxlength="20" />
    </div>
    <div class="testoRegistra">Consenso al Trattamento dei Dati Personali</div>
    <div>
    <textarea name="msgPrivacy" cols="80" rows="20" readonly="readonly" class="testoRegistra">
    Informativa ai sensi del d. lgs. 196/2003...
    ...
    </textarea>
    </div
    ><div>
    <p class="testoRegistra">Consenti?<input name="privacy" type="checkbox" value="1" />
    </p>
    </div>
    <p align="center">
    <input name="Invia" type="submit" id="Invia" value="Invia" onclick="resetform()"/>

    <input name="Reset" type="reset" id="Reset" value="Cancella" />
    </p>
    </form>
    .
    .
    ...

  8. #8
    Beh, vedi un po adesso te...

  9. #9

    si grazie

    ok ok scusa... ora vedo e ti faccio sapere

Permessi di invio

  • Non puoi inserire discussioni
  • Non puoi inserire repliche
  • Non puoi inserire allegati
  • Non puoi modificare i tuoi messaggi
  •  
Powered by vBulletin® Version 4.2.1
Copyright © 2026 vBulletin Solutions, Inc. All rights reserved.