javascript - Convert Form Data into Request Data for an AJAX Request -


i trying submit form data via post ajax request , cannot find solutions.

i can't values id or name etc because dynamically created depending on data database.

i have tried using childnodes , think may solution cannot figure out. need use jquery? can done js i'm beginner.

any ideas appreciated, cheers.

did tried below

$( "form" ).submit(function( event ) {  ( var jsondata = $( ).serializearray() );   event.preventdefault();  // --- ajax request }); 

Comments