Bonjour,

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
40
41
42
43
var colorPickerNamespace = {
	cp:null,
	already_open:false,
 
	createColorPicker:function (){
		if(this.cp) return;
 
		var imgBase = 'creating/';
 
			//On crée la fenêtre contenant le sélecteur de couleur
			var CE1=null;
			CE1=document.createElement("div");
			CE1.setAttribute("id","ColorPicker");
			CE1.setAttribute("position", "absolute");
			CE1.setAttribute("z-index","10");
			CE1.setAttribute("fontFamily","tahoma, verdana, sans-serif");
			CE1.setAttribute("font-size","10px");
			CE1.setAttribute("border", "1px solid #000");
			CE1.setAttribute("width", "397px");
			CE1.setAttribute("height", "305px");
			CE1.setAttribute("backgroundColor","#E0DFE3");
			document.getElementById("actbtn_color").insertBefore(CE1);
 
			//On crée le titre
			var CE2=document.createElement("div");
			CE2.setAttribute("id","TitleColorPicker");
			CE2.setAttribute("top", "3px");
			CE2.setAttribute("left","8px");
			CE2.setAttribute("position", "absolute");
			CE2.setAttribute("z-index","11");
			document.getElementById("ColorPicker").insertBefore(CE2);	
			var txt=document.createTextNode("Select color :");
			document.getElementById("TitleColorPicker").appendChild(txt);
	},
 
	attachColorPicker:function(input, cmd)
	{
		if(!this.already_open)
		{
		 this.createColorPicker();
		}
	}
}
J'appelle cet espace par la fonction
Code : Sélectionner tout - Visualiser dans une fenêtre à part
colorPickerNamespace.attachColorPicker("","");
Sous IE, j'ai juste les mots "Select color" qui s'affichent
et sous firefox , rien mis à part un message d'erreur :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
Erreur*: [Exception... "Index or size is negative or greater than the allowed amount"  code: "1" nsresult: "0x80530001 (NS_ERROR_DOM_INDEX_SIZE_ERR)"  location: "file:///C:/Documents%20and%20Settings/Cyrille/Bureau/whizzy/whizzery/whizzywig.js Line: 545"]
Fichier Source*: file:///C:/Documents%20and%20Settings/Cyrille/Bureau/whizzy/whizzery/whizzywig.js
Ligne*: 545
Pourquoi ce message d'erreur?
et pourquoi sous ie, le cadre de 'mes' div n'apparait - il pas ?

Merci