Este es el codigo:
Código PHP:
<html>
<head>
<title>Buscar Repuestos</title>
</head>
<body onLoad="document.search.codigo.focus();" >
<SCRIPT LANGUAGE="JAVASCRIPT">
function validar(){
var CamposRellenos;
CamposRellenos = false;
inputs = document.getElementsById('search');
for (i=0; i < inputs.length; i++)
if (inputs[i].value != "0")
CamposRellenos = true;
if (CamposRellenos)
document.search.submit();
else {
alert("Debe de rellenar algún campo de texto")
return 0;
}
}
</SCRIPT>
<form name="search" method="post" action="scripts/3.asp" autocomplete="off">
<div align="center">
<table width="873" height="71" border="0" cellpadding="2" cellspacing="2">
<tr>
<td height="39"> Código </td>
<td> Descripcion: </td>
<td>Familia</td>
<td width="260">Seleccionar Stock</td>
</tr>
<tr>
<td width="99" height="26" ><input type="text" name="codigo" id="codigo" value="" size=15 MaxLength="9"></td>
<td width="306"><input type="text" name="descripcion" id="descripcion"value="" size=50></td>
<td width="182"><select name="familia">
<option selected></option>
<%do until rs1.eof%>
<option value="<%=rs1("familia")%>"><%=rs1("familia")%></option>
<%rs1.MoveNext
loop
rs1.Close
set rs1 = Nothing%>
</select>
</td>
<td>
<select name="stock">
<option selected>Todos</option>
<option>Solo con Stock</option>
</select>
</td>
</tr>
</table>
<input type="submit" onClick="validar()" value="Buscar">
</div>
</FORM>
</body>
</html>
validacion...ademas que necesito saber como validar si el usuario selecciono algun
valor del select....yo se que se verifica con un selected index ==0...
pero no se como aplicarlo a este ejemplo
De antemano muchas gracias