Location: PHPKode > projects > EmploiNet : a timetable web manager > EmploiNet/v0.8.0/edt/ModifRapide/modifie_bis2.php3
<?



// Fonctions permettant le traitement des modifications 

	print("<script language=\"JavaScript\">\n");



	print("function changerImage(NomImage)\n");

	print("{\n");

	print("if (document.images[NomImage].src.indexOf('Delete')>0)\n");

	print("document.images[NomImage].src='./img/ellipse.gif';\n");

	print("else\n");		

	print("document.images[NomImage].src='./img/Delete.gif';\n");

	print("}\n\n");

	

	print("function modifierChaine(Niveau,taille)\n");

	print("{\n");

	print("ch=document.form1.tableau1.value;\n");

	print("tmp=ch.substr(0,Niveau)+'1'+ch.substr(Niveau+1,taille-Niveau)\n;");

	print("document.form1.tableau1.value=tmp\n;");

	print("}\n\n");

	

	print("function modifierChaineMult(Niveau,taille)\n");

	print("{\n");

	print("ch=document.form1.tableau1.value;\n");

	print("val=ch.substr(Niveau,1);\n");

	print("if (val==1) val=0; else val=1;\n");

	print("tmp=ch.substr(0,Niveau)+val+ch.substr(Niveau+1,taille-Niveau)\n;");

	print("document.form1.tableau1.value=tmp\n;");

	print("}\n\n");

	

	print("function cocherTous(nb)\n");

	print("{\n");

	print("for(i=1;i<=nb;i++)\n");

	print("{\n");

	print("document.images[i+3].src='./img/Delete.gif';\n");

	print("modifierChaineMult(6+i,6+nb);\n");

	print("}\n");

	print("}\n\n");



	print("function cocherAucun(nb)\n");

	print("{\n");

	print("for(i=1;i<=nb;i++)\n");

	print("{\n");

	print("document.images[i+3].src='./img/ellipse.gif';\n");

	print("modifierChaineMult(6+i,6+nb);\n");

	print("}\n");

	print("}\n\n");



	print("</script>\n\n");



?>
Return current item: EmploiNet : a timetable web manager