FORM DATA ON PHP PAGE

FORM DATA ON PHP PAGE

nicolalorenzininicolalorenzini Posts: 6Questions: 1Answers: 0
edited July 2012 in General
Hi everyone, when i try to send a form of a records inside this pagination, a php page read me just some records, and missed other...
But in a html page i have all a record list ..i missed something?

Replies

  • allanallan Posts: 63,542Questions: 1Answers: 10,476 Site admin
    See this example: http://datatables.net/release-datatables/examples/api/form.html

    Allan
  • nicolalorenzininicolalorenzini Posts: 6Questions: 1Answers: 0
    Thx Allan is right what i try :-) but how send all that on a php page? i mean
    if i use this
    [code]
    var oTable;
    $(document).ready(function() {
    $('form').submit( function() {
    var sData = $('input', oTable.fnGetNodes()).serialize();
    alert( "The following data would have been submitted to the server: \n\n"+sData );
    return false;
    } );

    oTable = $('.tabledata').dataTable();
    } );
    [/code]



    that let me see aler of all my data, but now how send them? ..sorry im a newbe
  • nicolalorenzininicolalorenzini Posts: 6Questions: 1Answers: 0
    i tried this
    [code]
    var oTable;
    $(document).ready(function() {
    $('form').submit( function() {

    var sData = $('input', oTable.fnGetNodes()).serialize();
    $.post("test.php", sData);
    alert("Data Loaded: " + sData);
    //alert( "The following data would have been submitted to the server: \n\n"+sData );
    return false;

    } );

    oTable = $('.tabledata').dataTable();
    } );
    [/code]

    and yes page "test.php" is called but still not with sData value
  • nicolalorenzininicolalorenzini Posts: 6Questions: 1Answers: 0
    finally i see how ... :D

    [code]
    var oTable;
    $(document).ready(function() {
    $('form').submit( function() {

    var sData = $('input', oTable.fnGetNodes()).serialize();
    var sDatas = $('select', oTable.fnGetNodes()).serialize();
    var sCustomer = '<?php echo $_GET['view']?>';
    $.post("test.php", {myinput: sData, myselect: sDatas, mycustomer: sCustomer});
    return false;
    } );

    oTable = $('.tabledata').dataTable();
    } );
    [/code]
This discussion has been closed.