jquery - How to make a POST API call with many (50+) fields -
i have large api call make info on form.
i can't seem figure out best way go sending serialized data api endpoint.
- i put fields object in javascript, , pass it
- i take model submitted controller, , pass end point
i'm not sure how either.
jquery has built-in method make easy.
$.post("/somepage.asp",$("#theform").serialize()).done(function(){ // done! }).fail(function() { // went wrong! }); it serialize of form fields in form , post them page of choice.
http://api.jquery.com/jquery.post/
http://api.jquery.com/serialze/
http://learn.jquery.com/ajax/ajax-and-forms/
Comments
Post a Comment