diff --git a/index.html b/index.html index 655fbbe..3001e27 100644 --- a/index.html +++ b/index.html @@ -3,74 +3,12 @@ Manuel - - - + +
@@ -84,6 +22,16 @@
+
+ + +

+
Cherche ton code ici
@@ -91,24 +39,24 @@

Liens rapides :

- - -
-
+
- +
@@ -122,13 +70,44 @@ var nbpage = document.getElementById("nbpage"); + function editionchoisie() { + var editionchoisie = document.getElementsByName("edition")[0].value; + + if (editionchoisie == 'hachette') { + console.log("hachette"); + document.getElementById("editionesthcoisieest").innerHTML = ""; + } + else if ((editionchoisie == 'didier') || (editionchoisie == 'hatier')) { + console.log("DH"); + document.getElementById("editionesthcoisieest").innerHTML = ""; + } + else { + document.getElementById("editionesthcoisieest").innerHTML = "⚠ Cette édition n'est pas encore supportée ⚠"; + } + } + + function urlachanger() { var code = document.getElementById("code").value; - changerURL(code) + var editionchoisie = document.getElementsByName("edition")[0].value; + changerURL(code, editionchoisie) } - function changerURL(code) { - var newUrl1 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/Page_1.html?interface=postMessage"; - var newUrl2 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/Page_2.html?interface=postMessage"; + function changerURL(code, editionchoisie) { + if (editionchoisie == 'hachette') { + var newUrl1 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/Page_1.html?interface=postMessage"; + var newUrl2 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/Page_2.html?interface=postMessage"; + } + else if ((editionchoisie == 'didier') || (editionchoisie == 'hatier')) { + var newUrl1 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/page1.xhtml?interface=postMessage"; + var newUrl2 = "https://exobank.hachette-livre.fr/contents/final/" + code + "-fxl/OEBPS/page2.xhtml?interface=postMessage"; + } + else { + + } + + + + iframe1.src = newUrl1; iframe2.src = newUrl2; url1 = newUrl1;