how do I post form value to dynamically chage the data

how do I post form value to dynamically chage the data

brightsonbrightson Posts: 5Questions: 0Answers: 0
edited October 2009 in General
pls help on this ........

Here is my code


$(document).ready(function() {

$('#example').dataTable( {

"sPaginationType": "full_numbers",
"bProcessing": true,
"bServerSide": true,
"sAjaxSource": "dataTables/examples/examples_support/server_processing.php",

"fnServerData": function ( sSource, aoData, fnCallback ) {

/* Add some extra data to the sender */
aoData.push( { "name": "more_data", "value": 5} );
$.getJSON( sSource, aoData, function (json) {
/* Do whatever additional processing you want on the callback, then tell DataTables */
fnCallback(json)
} );
}
});



});


The above code is working fine, but instead of giving a static value 5 in the code ...
aoData.push( { "name": "more_data", "value": 5} );
I want to get it from a dropdown dynamically.

Thanks in advance

Replies

  • allanallan Posts: 63,691Questions: 1Answers: 10,500 Site admin
    Hi brightson,

    I think this is more of a general Javascript question than a DataTables one - if you could ask these in another forum such as the Web-developer forums in future: http://www.webdeveloper.com . Having said that, I think all you need to do is something like $('#id').val() to get the value of the target element.

    Allan
This discussion has been closed.