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
| function Correcteur_Init()
{
// Construction du DIV
var i;
var TxtHtml = "<div id='" + this.Nom + "' class='correcteur'>\n";
TxtHtml += "<form method='post' name='frm" + this.Nom + "' id='frm" + this.Nom + "' action='" + this.Cible + "'>\n";
[...]
// Insertion des boutons
TxtHtml += "<p class='boutons'>\n";
for(i = 0; i < this.tabBoutons.length; i++)
{
// Construction de la chaine du OnClick
StrClick = "";
StrJS = "this.form.Scroll.value=document.body.scrollTop;this.form.Action.value=this.value;this.form.submit();";
StrFin = "";
[...]
TxtHtml += "<input type='button' onclick='" + StrClick + StrJS + StrFin + "' value='" + this.tabBoutons[i][0] + "' />\n";
}
TxtHtml += "<input type='button' onclick='document.getElementById(\"" + this.Nom + "\").style.display=\"none\";' value='Annuler' />\n";
TxtHtml += "</p>\n";
TxtHtml += "</form>\n";
TxtHtml += "</div>";
document.write(TxtHtml);
} |