LO KE SUCEDE ES KE CUANDO OPRIMO EL BOTON DE BUSQUEDA CON LO DATOS EN EL CAMPO TEXTO, ESTE ME ENVIA UN MENSAJE DE ERROR.
Código HTML:
<script> function validar(form) { var error = "Por favor, antes de buscar complete:\n\n"; var a = "" if (form.buscar.value == "") { a += " La categoria y\n los Datos a buscar"; } if (a != "") { alert(error + a); return true; } form.submit() } </script> <link href="Estilos/equipos.css" rel="stylesheet" type="text/css"> <style type="text/css"> <!-- .Estilo1 { font-family: "Courier New", Courier, mono; font-weight: bold; } --> </style> <body bgcolor="#2C89AD"> <table border="" width="594"> <!--DWLayoutTable--> <tr> <td width="586" height="22" valign="top" bgcolor=#99CC33> <p align="center" class="Estilo1"><font color="#000000" size="3" >.:Buscador:.</font></td> </tr> </table> <form method = "POST" action = "FuncionariosBuscador.php"> <table width="594" border="0" cellpadding="0" cellspacing="0"> <!--DWLayoutTable--> <tr> <td width="49" height="23"></td> <td colspan="10" valign="top"><hr></td> <td width="86"></td> </tr> <tr> <td height="18"></td> <td width="28"></td> <td width="49"></td> <td width="60"></td> <td width="77"></td> <td width="14"></td> <td width="23"></td> <td width="51"></td> <td width="55"></td> <td width="4"></td> <td width="98"></td> <td></td> </tr> <tr> <td height="8"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td colspan="4" rowspan="2" valign="top"> <select name="Funcionarios"> <OPTION value="Rut_Asignado">Rut_Funcionario </OPTION> <OPTION value="Nombre">Nombre </OPTION> <OPTION value="Apellido">Apellido </OPTION> <OPTION value="Departamento">Departamento </OPTION> <OPTION value="Anexo">Anexo </OPTION> <OPTION value="Mail">E-mail </OPTION> </SELECT ></td> <td></td> <td></td> </tr> <tr> <td height="12"></td> <td></td> <td colspan="3" valign="top"><strong>Elija la Categoria a Buscar:</strong></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="56"></td> <td></td> <td></td> <td></td> <td></td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td> </td> <td></td> </tr> <tr> <td height="8"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td colspan="3" rowspan="2" valign="top"><input type="text" name="buscar" size="25" ></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="12"></td> <td></td> <td colspan="3" valign="top"><strong>Datos a Buscar:</strong> <br> </td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="4"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="16"></td> <td></td> <td valign="top"><div align="center"><a href="funcionarios.php"><font size="2"><strong>volver</strong></font> </a></div></td> <td></td> <td colspan="3" rowspan="2" valign="top"><input name="Submit" type="submit" value="Imp.Todos.Reg. "></td> <td></td> <td rowspan="2" valign="top"><input name="submit" type="button" value="Buscar"onClick="validar(this.form)"></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="7"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="1"></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> <td></td> </tr> <tr> <td height="21"></td> <td colspan="10" valign="top"><hr></td> <td></td> </tr> </table> </form> </body> </html>
Y EL ERROR AL KE ME HACE REFERENCIA ES EL SGTE(la linea 12 es form.submit()):
linea 12
car 1
error: el objeto no acepta esta propiedad o metodo
saludos a todas las mentes