Answer the question
In order to leave comments, you need to log in
How to get data from FormData on server side?
Good day, through ajax data goes to the server in the form FormData, that is, when reading the form on the server, [object FormData] is returned.
Actually, the question itself is: how to get data from this form on the server?
Answer the question
In order to leave comments, you need to log in
Damn it! It's hard for you! You can add only strings with strings, numbers only with numbers. But different objects are not allowed! FormData is not a string that contains a URL, it's an object!
request.send(form);
And that's it! Understand?
Output through alert try and you will understand what is wrong!
The rest of the data is of the type data = add something there by analogy through .append.
And one more thing: the form can be created from an HTML form that you already have on the page!
form = new FormData( document.getElementsByTagName("form")[0] );
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question