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

    campi obbligatori nei form

    Salve, qualcuno potrebbe aiutarmi nell'inserire dei campi obbligatori nel mio form?

    Ci ho provato in tutti i modi ma proprio non ci riesco...
    lo ammetto non sono molto brava ma prima o poi imparerò.

    vi mando un esempio di form


    <html>
    <head>
    <style>

    A.redblu:link { color:rgb(204,0,0); text-decoration:none; }
    A.redblu:visited { color:rgb(204,0,0); text-decoration:none; }
    A.redblu:active { color:rgb(204,0,0); text-decoration:none; }
    A.redblu:hover { color:rgb(10,80,161); text-decoration:none; }
    </style>

    <title>Richiedi Password</title>
    <%=KeyW%>
    </head>

    <body <%=bgcolor%><%=background%><%=bglink%><%=bgvlink%> <%=bgmargin%>>

    <div align=left><center>


    </center></div>
    <div align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="570" height="400">
    <tr>
    <td valign="top">
    <table border="0" cellpadding="0" cellspacing="0" width="570">
    <tr height="20">
    <td height="20"></td>
    </tr>
    <tr height="2">
    <td height="2" bgcolor="#0a50a1"></td>
    </tr>
    <tr height="20">
    <td bgcolor="#bedcf0" height="20">
    <div align="center">
    <font face="Verdana" size="3" color="#0a50a1">Hai dimenticato la Password?</font></div>
    </td>
    </tr>
    <tr height="10">
    <td height="10"></td>
    </tr>
    <tr>
    <td><font size="2" face="Verdana">Hai dimenticato la tua User-ID o la password ?</font><font face="Verdana">

    </font>

    <div align="justify">
    <font face="Verdana" size="2">Compila il form sottostante specificando l'indirizzo e-mail presso il quale sarai contattato.</font></div>
    </td>
    </tr>
    <tr>
    <td>
    <div align="center">
    <table border="0" cellpadding="0" cellspacing="0" width="570">
    <tr height="25">
    <td height="25" colspan="2">
    <form method="post" action="/Mailpassword.asp" name="validazione" ENCTYPE="multipart/form-data" >
    </td>
    </tr>
    <tr height="25">
    <td height="25" width="200">
    <div align="right">
    <font face="Verdana">Nome:</font></div>
    </td>
    <td height="25"><input type="text" name="nome" size="15"></td>
    </tr>
    <tr height="25">
    <td height="25" width="200">
    <div align="right">
    <font face="Verdana">Cognome:</font></div>
    </td>
    <td height="25"><input type="text" name="cognome" size="15"></td>
    </tr>
    <tr height="25">
    <td height="25" width="200">
    <div align="right">
    <font face="Verdana">Citt&agrave;:</font></div>
    </td>
    <td height="25"><input type="text" name="citta" size="15"></td>
    </tr>
    <tr height="25">
    <td height="25" width="200">
    <div align="right">
    <font face="Verdana">E-Mail:</font></div>
    </td>
    <td height="25"><input type="text" name="email" size="20"></td>
    </tr>
    <tr height="25">
    <td height="25" colspan="2">
    <div align="left">
    <font face="Verdana" size="2">Indica se hai perso la User-ID o la Password:</font></div>
    </td>
    </tr>
    <tr>
    <td width="200"></td>
    <td><select size="1" name="smarrita">
    <option>User-ID</option>
    <option>Password</option>
    </select></td>
    </tr>
    <tr height="20">
    <td width="200" height="20"></td>
    <td height="20"></td>
    </tr>
    <tr>
    <td colspan="2">
    <div align="center">
    <font face="Arial" color="#101077"></font><input type="submit" name="invia" value="Conferma ed Invia">
    <input type="reset" value="Reimposta" name="B2"></font></small></form></div>
    </td>
    </tr>
    <tr height="20">
    <td colspan="2" height="20"></td>
    </tr>
    </table>
    </div>
    </td>
    </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="570">
    <tr height="2">
    <td bgcolor="#0a50a1" height="2"></td>
    </tr>
    </table>
    <table border="0" cellpadding="0" cellspacing="0" width="570">
    <tr height="10">
    <td height="10"></td>
    </tr>
    <tr>
    <td>
    <div align="center">
    <font face="Verdana" size="2" color="#cc0000">Torna alla Home</font></div>
    </td>
    </tr>
    </table>
    </td>
    </tr>
    </table>
    </div>



    </p>
    </body>
    </html>


    grazie mille

  2. #2
    Utente di HTML.it L'avatar di *pragma
    Registrato dal
    Sep 2001
    Messaggi
    1,087
    ascolta non ho letto il tuo codice perchè è troppo breve:gren:

    ti posto questo ....
    un po' didattico.
    Da qui cerca di ricavarti quello che ti serve

    <html>
    <head>

    <title>obbiga campo</title>

    <script type="text/javascript">
    var piero
    function rendiAttivo() {
    piero = document.forms[0]
    for (var i = 0; i < piero.nomeRadio.length; i++) {
    if (piero.nomeRadio[i].checked) {
    break
    }
    piero.attiva.disabled = false
    }
    }
    </script>

    </head>

    <body >
    <span style="color: #adfe89;">a</span>

    <span style="color: #ad4ea9;">b</span>

    <span style="color: #adfec9;">c</span>

    <span style="color: #4ddef9;">d</span>


    <form name="nomeForm">

    <fieldset name="campo" style="width:120px;border:0;">
    <input type="radio" name="nomeRadio" value="Bruce Springsting"
    onFocus = "rendiAttivo()">Nome1


    <input textarea name="area" value="Bruce Springsting"
    onFocus = "rendiAttivo()">
    </fieldset>


    <input type="radio" name="nomeRadio" value="nome2">Nome2


    <input type="radio" name="nomeRadio" value="nome3">Nome3



    <input type="button" name="attiva" value="mostra il nome" disabled onClick = 'alert("Hai scelto bene!")'>




    <input type="reset" value="annulla" />

    </form>

    </body>
    </html>

  3. #3
    grazie, provo a studiare il tuo esempio anche se la vedo tragica...

  4. #4
    Originariamente inviato da *pragma
    ascolta non ho letto il tuo codice perchè è troppo breve:gren:

    ti posto questo ....
    un po' didattico.
    Da qui cerca di ricavarti quello che ti serve

    <html>
    <head>

    <title>obbiga campo</title>

    <script type="text/javascript">
    var piero
    function rendiAttivo() {
    piero = document.forms[0]
    for (var i = 0; i < piero.nomeRadio.length; i++) {
    if (piero.nomeRadio[i].checked) {
    break
    }
    piero.attiva.disabled = false
    }
    }
    </script>

    </head>

    <body >
    <span style="color: #adfe89;">a</span>

    <span style="color: #ad4ea9;">b</span>

    <span style="color: #adfec9;">c</span>

    <span style="color: #4ddef9;">d</span>


    <form name="nomeForm">

    <fieldset name="campo" style="width:120px;border:0;">
    <input type="radio" name="nomeRadio" value="Bruce Springsting"
    onFocus = "rendiAttivo()">Nome1


    <input textarea name="area" value="Bruce Springsting"
    onFocus = "rendiAttivo()">
    </fieldset>


    <input type="radio" name="nomeRadio" value="nome2">Nome2


    <input type="radio" name="nomeRadio" value="nome3">Nome3



    <input type="button" name="attiva" value="mostra il nome" disabled onClick = 'alert("Hai scelto bene!")'>




    <input type="reset" value="annulla" />

    </form>

    </body>
    </html>
    cos'è ????

    un gioco ?

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 © 2024 vBulletin Solutions, Inc. All rights reserved.