P
P
Pavel Kizernis2015-09-30 10:58:11
PHP
Pavel Kizernis, 2015-09-30 10:58:11

How to submit an HTML form with a file without reloading the page?

It doesn't work with jQuery Ajax via serialize(), and as I understand it, it can't.

Does it make sense to use FormData?
As far as I understand, it is not very well supported by browsers ... Maybe there are crutches for unsupported browsers on it?

Any other cross browser options?
I heard something about the method with the iframe, but did not fully understand where this iframe should be?

PS By the way, correct me if I'm wrong: you can't send a file using the get method, right?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
V
Vitaly Inchin ☢, 2015-09-30
@pashakiz

Banned on google? © Folk wisdom

Press here
But such variant will pass only with IE9+.
I'll fantasize:
-
In theory, it is possible, but only the weight of the data sent will be much larger, since GET encodes them in its own way, and the number of characters in the end should not exceed 255.

G
GoodProject, 2015-09-30
@GoodProject

Creating AJAX feedback forms on the site

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question