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

Popular posts from this blog

java - Jmockit String final length method mocking Issue -

asp.net - Razor Page Hosted on IIS 6 Fails Every Morning -

c++ - wxwidget compiling on windows command prompt -