elhacker.net cabecera Bienvenido(a), Visitante. Por favor Ingresar o Registrarse
¿Perdiste tu email de activación?.

 

 


Tema destacado: Guía actualizada para evitar que un ransomware ataque tu empresa


+  Foro de elhacker.net
|-+  Programación
| |-+  Programación General
| | |-+  .NET (C#, VB.NET, ASP)
| | | |-+  Programación Visual Basic (Moderadores: LeandroA, seba123neo)
| | | | |-+  Capturar datos de checkbox
0 Usuarios y 1 Visitante están viendo este tema.
Páginas: [1] Ir Abajo Respuesta Imprimir
Autor Tema: Capturar datos de checkbox  (Leído 1,890 veces)
rvilla777

Desconectado Desconectado

Mensajes: 8


Ver Perfil
Capturar datos de checkbox
« en: 6 Septiembre 2013, 16:58 pm »

Buenos dias, tengo un problema con la captura de datos de varios checkbox seleccionados.

Lo que quiero hacer es enviar todos los datos de checkbox seleccionados y capturarlos en un array en otra página, para luego realizar consultas sql .

Este es mi codigo en html.


Código
  1. <script language="javascript">
  2. function noborrar()
  3. {
  4. alert("Para modificar los datos favor de ingresar a sistema SUF.");
  5. }
  6.  
  7. <form method="POST" action="traspaso_suf.asp">
  8. <div align="center">
  9. <table border="0" width="85%" id="table3" cellspacing="0" cellpadding="0">
  10. <tr>
  11. <td align="center">
  12. <table border="1" width="100%" id="table4" style="border-left-width: 0px; border-right-width: 0px" bgcolor="#FFFFCC">
  13. <tr>
  14. <td colspan="5" bgcolor="#000080" style="border-style: solid; border-width: 1px">
  15. <b><font face="Arial" size="2" color="#FFFFFF">Proyectos en
  16. SUF (<%Response.Write r_usuario%>) </font></b></td>
  17. </tr>
  18. <tr>
  19. <td style="border-style: none; border-width: medium" width="8%">
  20. Selección</td>
  21. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="35%">
  22. Fecha</td>
  23. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="52%">
  24. Nombre del Proyecto</td>
  25. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="2%">
  26. &nbsp;</td>
  27. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="1%">&nbsp;</td>
  28. </tr>
  29. <%do while not udatos.eof%>
  30. <tr>
  31. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="8%">
  32. <input name="chk_turno" type="checkbox" value="<%=udatos("cod_proyecto")%>" onclick="document.getElementById('div_li_turno').s tyle. display = (this.checked) ? 'block' : 'none' " ></td>
  33. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="35%">
  34. <font size="3">
  35. <input name="T4" size="25" readonly value="<%=udatos("fecha")%>" style="font-family: Arial; "></font></td>
  36. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="52%">
  37. <font size="3">
  38. <input name="T3" size="72" readonly value="<%=udatos("nombre_proyecto")%>" style="font-family: Arial; "></font></td>
  39. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="2%">
  40. &nbsp;</td>
  41. <td style="border-left-style: none; border-left-width: medium; border-right-style: none; border-right-width: medium; border-bottom-style: none; border-bottom-width: medium" width="1%">&nbsp;</td>
  42. </tr>
  43. <%udatos.movenext
  44.                loop
  45. %>
  46. </table>
  47. </td>
  48. </tr>
  49. </table>
  50. <input type="submit" value="Traspasar" name="B3"  style="color: #333333">
  51. </form>
  52.  
  53.  

El problema es como los capturo en el array.

Código
  1. <%
  2. dim vector()
  3. vector = Request.Form("chk_turno")
  4.  
  5. Set cn = Server.CreateObject("ADODB.Connection")
  6. cn.Open ("Provider=SQLOLEDB;Server=STGOSQL2K8;Database=IndapCred;Uid=R04; Pwd=R04;")
  7.  
  8. for i=0 to UBound(vector)
  9. Response.Write vector
  10.  
  11. next
  12.  
  13.  
  14. %>
  15.  
  16.  

Gracias por la ayuda.


En línea

noele1995

Desconectado Desconectado

Mensajes: 137



Ver Perfil
Re: Capturar datos de checkbox
« Respuesta #1 en: 8 Septiembre 2013, 16:10 pm »

Esto no es VB6 subforo equivocado.


En línea

Páginas: [1] Ir Arriba Respuesta Imprimir 

Ir a:  

Mensajes similares
Asunto Iniciado por Respuestas Vistas Último mensaje
Capturar datos de una Web
Programación Visual Basic
ReViJa 0 1,243 Último mensaje 6 Junio 2006, 15:05 pm
por ReViJa
Actualizar checkbox base de datos (PHP + MySQL)
PHP
KateLibby 1 15,178 Último mensaje 15 Abril 2010, 23:13 pm
por KateLibby
Problema con checkbox y base de datos
PHP
betocube 5 5,916 Último mensaje 21 Abril 2011, 22:33 pm
por betocube
Capturar datos de la RAM
Programación General
Meta 2 2,508 Último mensaje 6 Septiembre 2012, 01:40 am
por [Case]
guardar datos de un formulario con varios checkbox's en variables
PHP
ukatonaf2014 0 2,563 Último mensaje 3 Noviembre 2014, 19:14 pm
por ukatonaf2014
WAP2 - Aviso Legal - Powered by SMF 1.1.21 | SMF © 2006-2008, Simple Machines