Ver Mensaje Individual
  #1 (permalink)  
Antiguo 28/12/2007, 05:28
Avatar de hades87
hades87
 
Fecha de Ingreso: diciembre-2007
Ubicación: Barcelona - España
Mensajes: 3.194
Antigüedad: 17 años, 1 mes
Puntos: 68
el boton submit se me queda deshabilitado

aquí tengo la función para que el botón submit se quede disabled hasta k nos e rellenan x campos, pero aun que los llenes todos se queda disabled igual.

El tema es que en otro formulario tengo puesto la misma función y si me va, alguien me pdoria decir en que fallo?

Gracias ^^

Código HTML:
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="es" lang="es">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>contacte</title>
<script language="javascript">
function deshabilita(form)
{
    if ((form.nom.value != "") && (form.cognoms.value != "") && (form.telef.value != "") && (form.obser.value != ""))
    { form.enviar.disabled = false; }

    else {
    form.enviar.disabled = true; }
}
</script>
</head>
<body bgcolor="#ffffff" onLoad="this.document.form1.Nom.focus()">
<form name="form1" method="post" enctype="text/plain" action="mailto:[email protected]">
  <table width="200" border="0">
    <tr>
      <td>Nom</td>
      <td><input name="nom" type="text" id="Nom" onKeyUp="deshabilita(this.form)"></td>
      <td>Cognoms </td>
      <td><input name="cognoms" type="text" id="Cognoms" onKeyUp="deshabilita(this.form)"></td>
    </tr>
    <tr>
      <td>Tel&eacute;fon</td>
      <td><input name="telef" type="text" id="Telef" onKeyUp="deshabilita(this.form)"></td>
      <td>Fax </td>
      <td><input name="Fax" type="text" id="Fax"></td>
    </tr>
    <tr>
      <td>E-mail</td>
      <td><input name="E-mail" type="text" id="E-mail"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="2">Altres observacions</td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
    <tr>
      <td colspan="4"><textarea name="obser" cols="50" rows="8" id="Obser" onKeyUp="deshabilita(this.form)"></textarea></td>
    </tr>
    <tr>
      <td><input name="Enviar" type="submit" id="Enviar" value="Enviar" disabled></td>
      <td><input type="reset" name="Submit" value="Restablir"></td>
      <td>&nbsp;</td>
      <td>&nbsp;</td>
    </tr>
  </table>
  </form>
</body>
</html> 

Última edición por hades87; 28/12/2007 a las 06:16