jquery ajax send custom data after serialize

Solutions on MaxInterview for jquery ajax send custom data after serialize by the best coders in the world

showing results for - "jquery ajax send custom data after serialize"
Lennart
15 Jul 2020
1var data = $(this).serializeArray(); // convert form to array
2data.push({name: "NonFormValue", value: NonFormValue});
3$.ajax({
4    type: 'POST',
5    url: this.action,
6    data: $.param(data),
7});
Rob
05 Sep 2016
1var data = $('#myForm').serializeArray();
2data.push({name: 'wordlist', value: wordlist});
3
4$.post("page.php", data);
5