Ver Mensaje Individual
  #6 (permalink)  
Antiguo 12/11/2007, 15:41
setram
 
Fecha de Ingreso: julio-2007
Mensajes: 63
Antigüedad: 16 años, 9 meses
Puntos: 0
Re: validar que almenos haya 1campo en el buscador

el formulario es este:

Código HTML:
<form action="buscador_a2.php" method="post" name="form" id="form">
  <table width="100%" border="1" cellspacing="0" cellpadding="0">
    <tr> 
      <td>titular de la noticia:</td>
      <td>comentario:</td>
    </tr>
    <tr> 
      <td valign="top">
<input name="tit" id="tit" size="40">
      </td>
      <td><textarea name="ing" cols="40" rows="2" wrap="VIRTUAL" id="textarea"></textarea></td>
    </tr>
    <tr> 
      <td>categoria:</td>
      <td>p&uacute;blico:</td>
    </tr>
    <tr> 
      <td><table width="176" height="48" id="menu_categoria">
          <tr> 
            <td width="77"> <input type="radio" name="cat" value="amor">amor</td>
            <td width="83"> <input type="radio" name="cat" value="cultura">
              cultura</td>
          </tr>
          <tr> 
            <td> <input type="radio" name="cat" value="deporte">deporte</td>
            <td> <input type="radio" name="cat" value="dinero">
              dinero</td>
          </tr>
        </table></td>
      <td><table width="243" id="menu_publico">
          <tr> 
            <td width="105"> <input name="pub1" type="checkbox" id="pub1" value="adulto">
              adulto</td>
            <td width="126"> <input name="pub3" type="checkbox" id="pub3" value="ni&ntilde;o">
              niñoo</td>
          </tr>
          <tr> 
            <td> <input name="pub2" type="checkbox" id="pub2" value="joven">
              joven</td>
            <td> <input name="pub4" type="checkbox" id="pub4" value="ancianos">
              ancianos</td>
          </tr>
        </table></td>
    </tr>
    <tr>
      <td>importancia: </td>
      <td>&nbsp;</td>
    </tr>
    <tr> 
      <td><select name="imp" id="select2">
          <option value="nada"></option>
          <option value="baja">baja</option>
          <option value="media">media</option>
          <option value="alta">alta</option>
        </select></td>
      <td><input name="Submit2" type="submit" value="buscar" onClick="return validacion()"></td>
    </tr>
  </table>
  </form> 

lpz, lo que no se hacer es eso. Tengo una idea de como debería ser:
si el contador esta en 0, entrar en el if, y mirar campo 1, si esta lleno --> contador=1. Y ya podriá salir del if y enviar en formulario. Sino, pasar por el campo 2, y el 3 y 4...asi succesivamente.

Es así no?
Pero no se como tiene que ser el código

Gracias otra vez

Última edición por setram; 12/11/2007 a las 15:44 Razón: apreté enviar sin acabar el mensaje..