..help!
ho fatto ricerche e provato tutto quello che ho trovato ma proprio nn ne vengo fuori!
allora, ovviamente ho un form.. e ovviamente nn funzia il controllo campi!!
codice:<script language="javascript"> <!-- function controlla(objform) { var ok = 1; if (objform.nome.value == "") {alert("Il campo nome è obbligatorio!"); var ok = 0;} if (objform.cognome.value == "") {alert("Il campo nome è obbligatorio!"); var ok = 0;} if (objform.azienda.value == "") {alert("Il campo nome è obbligatorio!"); var ok = 0;} if (objform.indirizzo.value == "") {alert("Il campo nome è obbligatorio!"); var ok = 0;} if (objform.telefono.value == "") {alert("Il campo nome è obbligatorio!"); var ok = 0;} if (objform.email.value == "") {alert("Il campo nome è obbligatorio!"); var ok = 0;} //--> </script> </head> <body bgcolor="#444641">....
questo invece e' il form:
io penso che sia il comando attribiuto al pulsante che nn va...................codice:<form method="post" enctype="multipart/form-data" name="guestbook" onsubmit="return controlla(this)" action="spedisci.asp"> <table width="600" border="0" cellpadding="0" cellspacing="0" class="main"> <tr> <td width="150" height="35" align="right" valign="top">Nome</td> <td width="150" height="35" align="left" valign="top"><input name="name" type="text" class="textfield" id="name" /> </td> <td width="150" height="35" align="right" valign="top">Cognome</td> <td width="150" height="35" align="left" valign="top"><input name="cognome" type="text" class="textfield" id="cognome" /></td> </tr> <tr> <td width="150" height="35" align="right" valign="top">Azienda</td> <td width="150" height="35" align="left" valign="top"><input name="azienda" type="text" class="textfield" id="azienda" /></td> <td width="150" height="35" align="right" valign="top">Mansione</td> <td width="150" height="35" align="left" valign="top"><label> <select name="mansione" class="textfield" id="mansione"> <option>Resp. marketing</option> <option>Resp. commerciale</option> <option>Direzione</option> <option>Impiegato</option> <option>Uff. commerciale</option> <option>Uff. amministrativo</option> <option>altro...</option> </select> </label></td> </tr> <tr> <td width="150" height="35" align="right" valign="top">Indirizzo</td> <td width="150" height="35" align="left" valign="top"><input name="indirizzo" type="text" class="textfield" id="indirizzo" /></td> <td width="150" height="35" align="right" valign="top">Telefono</td> <td width="150" height="35" align="left" valign="top"><input name="telefono" type="text" class="textfield" id="telefono" /></td> </tr> <tr> <td width="150" height="35" align="right" valign="top">E-mail</td> <td width="150" height="35" align="left" valign="top"><input name="email" type="text" class="textfield" id="email" /></td> <td width="150" height="35" align="right" valign="top"></td> <td width="150" height="35" align="left" valign="top"></td> </tr> <tr> <td width="150" height="35" align="right" valign="top">Messaggio</td> <td height="35" colspan="3" align="left" valign="top"><textarea name="messaggio" class="formtext" id="messaggio"></textarea> </td> </tr> <tr> <td height="25" colspan="2" align="left" valign="top"><label></label></td> <td width="150" height="25" align="left" valign="top"></td> <td width="150" height="25" align="left" valign="top"></td> </tr> <tr> <td height="35" colspan="2" align="right" valign="top"><table width="250" border="0" cellpadding="0" cellspacing="0" class="main"> <tr> <td width="220" align="right">Voglio ricevere anche la newsletter </td> <td><input name="newsletter" type="radio" value="radiobutton" /></td> </tr> </table></td> <td width="150" height="35" align="left" valign="top"></td> <td width="150" height="35" align="left" valign="top"></td> </tr> <tr> <td height="35" colspan="2" align="right" valign="top"><table width="250" border="0" cellpadding="0" cellspacing="0" class="main"> <tr> <td width="220" align="right">Voglio ricevere le BEE novità </td> <td><input name="novita" type="radio" value="radiobutton" /></td> </tr> </table></td> <td width="150" height="35" align="right" valign="top">Contatto MSN</td> <td width="150" height="35" align="left" valign="top"><input name="msn" type="text" class="textfield" id="msn" /></td> </tr> <tr> <td height="35" colspan="2" align="right" valign="top"><table width="250" border="0" cellpadding="0" cellspacing="0" class="main"> <tr> <td width="220" align="right">Voglio ricevere gli arretrati </td> <td><input name="arretrati" type="radio" value="radiobutton" /></td> </tr> </table></td> <td width="150" height="35" align="right" valign="top">Contatto Skype </td> <td width="150" height="35" align="left" valign="top"><input name="skype" type="text" class="textfield" id="skype" /></td> </tr> <tr> <td width="150" height="35"></td> <td width="150" height="35"></td> <td width="150" height="35"><input name="B1" type="submit" class="invia" value="Invia/Submit" ></td> <td width="150" height="35"></td> </tr> </table> </form>

Rispondi quotando