Salut à tous,
Après m'être arraché les cheveux pour créer un formulaire d'upload dynamique, tout content, cela fonctionne sous Firefox mais après test sous IE, j'avais une légère envie de balancer mon ecran par la fenetre. Auriez-vous quelques conseils pour rendre compatible ma fonction sous IE
Merci à vous
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39 function formPhoto(id) { var table = document.createElement('table'); table.id = 'tableUp'+id; var tr = document.createElement('tr'); var td = document.createElement('td'); td.id = 'formUp'+id; var td2 = document.createElement('td'); td2.id = 'fileUp'+id; var form = document.createElement('form'); form.action = 'php/annonce/uploadPhoto.php'; form.method = 'post'; form.enctype = 'multipart/form-data'; form.name = 'form'+id; form.target = 'uploadTarget'; var input = document.createElement('input'); input.type = 'file'; input.name = 'photo'+id; input.setAttribute("onChange", "uploadPhoto("+id+")"); var hiddenInput = document.createElement('input'); hiddenInput.type = 'hidden'; hiddenInput.name = 'hiddenField'; hiddenInput.value = id; td.appendChild(hiddenInput); td.appendChild(input); tr.appendChild(td); tr.appendChild(td2); table.appendChild(tr); form.appendChild(table); document.getElementById('formPhoto').appendChild(form); }
Partager