bonjour a tous
je n'arrive pas a affecter l'évènement change a ma liste ou même le click a ces items

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
if (barreg[i][e][1]=="createlistfont"){
var fonts=["Arial", "Aharoni", "Arial Black", "Arial Narrow", "Algerian", "Broadway", "Berlin Sans FB Demi", "Calibri", "Calligraph421 BT", "Castellar", "Comic Sans MS", "Copperplate Gothic Bold", "Courier", "Georgia", "Goudy Stout", "Harlow Solid Italic", "Helvetica", "Impact", "Informal Roman", "Lucida Calligraphy", "MS Sans Serif", "Milano LET", "Rockwell Extra Bold", "Script MT Bold", "Segoe Script", "Verdana", "Tahoma", "Trebuchet MS", "Victorian LET"];
var list=document.createElement("SELECT");
list.className="selects";
list.size=15;
list.id="listfont";
for (var a = 0; a < fonts.length; a++) {
var opt=document.createElement("OPTION");
opt.innerText=fonts[a];
opt.style.fontfamily=fonts[a];
list.appendChild(opt);
//opt.addEventListener("click", function() { document.execCommand("fontname",false,this.innertext);});
//opt.addEventListener("click", function() {execom("fontname",false,this.innertext);});
 
}
/// et pareil ici pour le change de la liste avec l'argument value en 3 eme 
divsub.appendChild(list);
}                               
 
 
function execom(fonct, argument1, argument2 )
{
alert(argument1);
 if (argument1=="undefined"){argument1=false;};
if (argument2=="undefined"){argument2=Null;}
document.execCommand(fonct, argument1, argument2) ;
}
j'ai essayé attachevent et meme le dom 1 "list.onchange="......"
ca fonctionne toujours pas

une idée????
merci pour les retours