Listing du fichier m1xml.js
00001// # (gH) -_- m1xml.js ; TimeStamp (unix) : 16 Novembre 2017 vers 17:24
00002
00003 // ###################################################################################
00004
00005 function partie(nump=0) {
00006
00007 // ###################################################################################
00008
00009 if (nump==0) { window.location.href="m1xml.php" ; } ;
00010
00011 var url = "#" ;
00012
00013 if (nump==1) {
00014 url = "m1xml_1_introduction.php" + "?standalone=FALSE"
00015 } // fin si
00016
00017 if (nump==2) {
00018 url = "m1xml_2_structure.php" + "?standalone=FALSE"
00019 } // fin si
00020
00021 if (nump==3) {
00022 url = "m1xml_3_valide.php" + "?standalone=FALSE"
00023 } // fin si
00024
00025 if (nump==4) {
00026 url = "m1xml_4_transforme.php" + "?standalone=FALSE"
00027 } // fin si
00028
00029 if (nump==5) {
00030 url = "m1xml_5_conclusion.php" + "?standalone=FALSE"
00031 } // fin si
00032
00033 if (nump==6) {
00034 url = "m1xml_6_exercices.php" + "?standalone=FALSE"
00035 } // fin si
00036
00037 if (nump==61) {
00038 url = "m1xml_6_tp1.php" + "?standalone=TRUE"
00039 window.document.location.href="m1xml_6_tp1.php" ;
00040 } // fin si
00041
00042 if (nump==62) {
00043 url = "m1xml_6_tp2.php" + "?standalone=TRUE"
00044 window.document.location.href="m1xml_6_tp2.php" ;
00045 } // fin si
00046
00047 if (nump>0) {
00048 // OK : ocument.location.href = url
00049
00050 var xhr;
00051 try { xhr = new ActiveXObject('Msxml2.XMLHTTP'); }
00052
00053 catch (e) {
00054
00055 try { xhr = new ActiveXObject('Microsoft.XMLHTTP'); }
00056
00057 catch (e2) {
00058
00059 try { xhr = new XMLHttpRequest(); }
00060
00061 catch (e3) { xhr = false; }
00062
00063 }
00064
00065 } // fin du catch
00066
00067 xhr.onreadystatechange = function() {
00068
00069 if (xhr.readyState == 4) {
00070
00071 if (xhr.status == 200) {
00072
00073 // on transmet tout le fichier
00074
00075 document.getElementById("contenu").innerHTML = xhr.responseText ;
00076
00077 } else {
00078
00079 document.getElementById("contenu").innerHTML= "<h1>Error code " + xhr.status + "</h1>" ;
00080
00081 } ; // fin de xhr.status == 200
00082
00083 } ; // fin de xhr.readyState == 4
00084
00085 } ; // fin de fonction xhr.onreadystatechange
00086
00087
00088 xhr.open("GET", url+"?standalone=FALSE", true);
00089 xhr.send(null);
00090
00091 } // fin si
00092
00093
00094 } // fin de fonction partie
00095
00096 // ###################################################################################
00097
00098 function montreSolution(numeroExercice) {
00099
00100 // ######################################################################
00101
00102 // rend visible la division qui contient la solution
00103
00104 window.document.getElementById("solution"+numeroExercice).setAttribute("class","visible") ;
00105 window.document.getElementById("bsol"+numeroExercice).innerHTML =" masquer la solution " ;
00106 window.document.getElementById("bsol"+numeroExercice).setAttribute("onclick","masqueSolution("+numeroExercice+") ; return false")
00107 window.document.getElementById("bsol"+numeroExercice).setAttribute("class","bouton_fin orange_pastel nou nobold") ;
00108
00109 } ; // fin de fonction montreSolution
00110
00111 // ######################################################################
00112
00113 function masqueSolution(numeroExercice) {
00114
00115 // ######################################################################
00116
00117 // rend visible la division qui contient la solution
00118
00119 window.document.getElementById("solution"+numeroExercice).setAttribute("class","invisible") ;
00120 window.document.getElementById("bsol"+numeroExercice).innerHTML =" afficher la solution " ;
00121 window.document.getElementById("bsol"+numeroExercice).setAttribute("onclick","montreSolution("+numeroExercice+") ; return false")
00122 window.document.getElementById("bsol"+numeroExercice).setAttribute("class","bouton_fin vert_pastel nou nobold") ;
00123
00124 } ; // fin de fonction masqueSolution
00125
00126
Pour ne pas voir les numéros de ligne, ajoutez &nl=non à la suite du nom du fichier.
Retour à la page principale de (gH)