Pass many input values through ajax -
my question related how send many form input values $.ajax
want understand how pass ~ 100 input values through ajax
for example input
<input type="text" name="your_form[]" id="amount1"> <input type="text" name="your_form[]" id="amount2"> <input type="text" name="your_form[]" id="amount3">
and ajax this?
var data=$(your_form).serialize(); $.ajax( { type: "post", url: "php_file.php", data: {"data" : data}, cache: false,
please, advice
you can pass input fields this:
<form id="my-form"> <input type="text" name="your_form[]" id="amount1"> <input type="text" name="your_form[]" id="amount2"> <input type="text" name="your_form[]" id="amount3"> ... </form>
jquery $.post("php_file.php", $("#my-form").serializearray(), function(data){ [handle response here] } );
Comments
Post a Comment