I make a certain list, each email list has a block next to it, on clicking on which the file selection window from the PC should open and then send via ajax. Found such an example, but I can’t get the element id to be passed. I did not find a solution on the Internet and I can not think of it myself.
- oneit uses a plugin, not a fact that you can pass an id from a web page with it, an example of downloading without plugins here is incode.pro/jquery/ajax-na-praktike-zagruzka-fajlov.html in .ajax ({data: ... }} pass whatever you want - Jean-Claude
- oneYou can use FormData ( developer.mozilla.org/ru/docs/Web/API/FormData/append ) .... where you can pass id as a file name ... for example, name_1, name_2, etc ... .... how to do this is written here.stackoverflow.com/a/516021/191482 .... - Alexey Shimansky
- 2Please write your code so that you can see what happened and where you have a problem. As for data transfer (id, etc.), see comments @ Alexey Shimanskiy above. - Alex
|