Foros del Web » Programando para Internet » Javascript »

[SOLUCIONADO] envio de formulario con Datatables

Estas en el tema de envio de formulario con Datatables en el foro de Javascript en Foros del Web. Hola a todos, estaba desarrollando una grilla de informacion la cual la muestro con DataTables (que me facilito bastante el trabajo), pero me tope con ...
  #1 (permalink)  
Antiguo 22/10/2013, 12:02
 
Fecha de Ingreso: mayo-2012
Ubicación: shilito
Mensajes: 67
Antigüedad: 11 años, 11 meses
Puntos: 3
envio de formulario con Datatables

Hola a todos, estaba desarrollando una grilla de informacion la cual la muestro con DataTables (que me facilito bastante el trabajo), pero me tope con un problema y como soy novato en javascript no se como poder solucionarlo, y es el siguiente:

¿Como envio los datos que tengo en mi DataTables a travez de un formulario?.

Hice e formulario y con su correspondiente Boton de SUBMIT pero no me envio el formulario, simplemete no hace nada. revisando la WEB vi que se debe de crear una funcion en javascript el cual envia los datos del formulario. Si alguien me puede orientar para dar una solucion se lo agrezco enormemente. Les dejo el Codigo:

Código PHP:

<?php
session_start
();
include
"../../validacion/sesion_valida.php";
include
"../../validacion/conexion.php";
include
"query.php";
//phpinfo();



$exe_query=mssql_query($query,$conexion);
$rows=mssql_num_rows($exe_query);

//echo $rows."<br>";

?>
<!DOCTYPE html>
<html>
    <head>
        <title>Plataforma Control</title>
        <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
        
        <script src="media/js/jquery.js" type="text/javascript"></script>
        <script src="media/js/jquery.dataTables.js" type="text/javascript"></script>
        
        <style type="text/css">
            @import "media/css/demo_table_jui.css";
            @import "media/themes/smoothness/jquery-ui-1.8.4.custom.css";
        </style>
        
        <style>
            *{
                font-family: arial;
            }
        </style>
        <script type="text/javascript" charset="iso-8859-1">
            $(document).ready(function(){
                $('#datatables').dataTable({
                    "sPaginationType":"full_numbers",
                    "aaSorting":[[2, "desc"]],
                    "bJQueryUI":true
                });
            })
            
        </script>
        
    </head>
    <body>
    <div id="contenedor-principal">
    <h1 class="titulo-mostrar">Plataforma Control</h1>
    <hr />
    
    <h3 class="titulo">Modulo de Aprobaciones de Movimientos</h3>
    
    <h5 class="caja-izquierda"><a href="../menu_hrd.php">Volver al Menu</a><span class="forma"></span></h5>
    
    <hr />
    
    <h3 class="titulo">Listado de Aprobaciones de Movimientos</h3>
        <div>
            <table id="datatables" class="display">
                <thead>
                    <tr>
                        <th>ID</th>
                        <th>N&deg; Mov.</th>
                        <th>F. Mov.</th>
                        <th>Estado Mov.</th>
                        <th>Ticket</th>
                      <th>T. Mov.</th>
                      <th>RUT</th>
                      <th>Nombre Completo</th>
                      <th>Empresa</th>
                      <th>Ubicacion Usuario</th>
                        <th>Tec. Responsable</th>
                        <th>Documento</th>
                        <th></th>
                    </tr>
                </thead>
                <tbody>
                    <?php
                    
while ($row mssql_fetch_array($exe_query)){?>
                    <form action="aprobacion_movimiento.php" method="post" enctype="application/x-www-form-urlencoded" name="form1" id="form1">
                        <tr>
                        <td><?php echo $row['0'];?> <input type="hidden" name="idqa" value="<?php echo $row['0'];?>"></td>
                        <td><?php echo $row['1'];?> <input type="hidden" name="abm" value="<?php echo $row['1'];?>"></td>
                        <td><?php echo $row['2'];?> <input type="hidden" name="fecha" value="<?php echo $row['2'];?>"></td>
                        <td><?php echo $row['3'];?> <input type="hidden" name="estado_mov" value="<?php echo $row['3'];?>"></td>
                        <td><?php echo $row['4'];?> <input type="hidden" name="ticket" value="<?php echo $row['4'];?>"></td>
                        <td><?php echo $row['5'];?> <input type="hidden" name="tipo_mov" value="<?php echo $row['5'];?>"></td>
                        <td><?php echo $row['6'];?> <input type="hidden" name="rut" value="<?php echo $row['6'];?>"></td>
                        <td><?php echo $row['7'];?> <input type="hidden" name="fullname" value="<?php echo $row['7'];?>"></td>
                        <td><?php echo $row['8'];?> <input type="hidden" name="empresa" value="<?php echo $row['8'];?>"></td>
                        <td><?php echo $row['9'];?> <input type="hidden" name="ubicacion" value="<?php echo $row['9'];?>"></td>
                        <td><?php echo $row['10'];?> <input type="hidden" name="tec_res" value="<?php echo $row['10'];?>"></td>
                        <td>
                        <?php  if(!empty($row['11'])){?> 
                            <a href="../upload/imagenes/mov<?php echo $row['1'].".pdf"?>" target="new">VER DOCUMENTO</a>
                        <?php }else{?>SIN DOCUMENTO<?php ?>                        
                        </td>
                            <td><input type="submit" name="validar" id="validar" value="Validar"></td>
                        </tr>
                    </form>
                    <?php //cierro while ?>
                </tbody>
            </table>
        </div>
    </div>
    </body>
</html>
  #2 (permalink)  
Antiguo 23/10/2013, 08:28
 
Fecha de Ingreso: mayo-2012
Ubicación: shilito
Mensajes: 67
Antigüedad: 11 años, 11 meses
Puntos: 3
Respuesta: envio de formulario con Datatables

bueno al final lo pude resolver de otra manera y fue que en vez de pasar un formulario pase 1 variable que solo necesitaba via URL y funciono a la perfeccion.

salu2

Etiquetas: datatables, formulario, funcion, html, input, jquery, js, php
Atención: Estás leyendo un tema que no tiene actividad desde hace más de 6 MESES, te recomendamos abrir un Nuevo tema en lugar de responder al actual.
Respuesta




La zona horaria es GMT -6. Ahora son las 06:56.