Ver Mensaje Individual
  #3 (permalink)  
Antiguo 02/08/2016, 20:55
alvaro_trewhela
Invitado
 
Mensajes: n/a
Puntos:
Respuesta: Enviar checkbox sin boton submit

[HIGHLIGHT="HTML"]Aplica:

Código Javascript:
Ver original
  1. document.getElementById('asd').submit();

en el elemento que deseas, y en asd pones el id de tu form

ejemplo:

Código HTML:
Ver original
  1.     <head>
  2.     </head>
  3.     <body>
  4.         <form method="post" action="" id="asd"/>
  5.         <b onclick="document.getElementById('asd').submit();">CLICK ON ME!!</b><br/>
  6.         <input type="text" name="asd"/>
  7.         </form>
  8.        
  9.         <?php
  10.        
  11.         echo $_POST["asd"];
  12.        
  13.         ?>
  14.     </body>
  15. </html>