Un@m3d
Membre récent

Hors-Ligne
Sexe: 
Messages: 14

|
Bonjour,
j'ai un problème avec IE sur plusieurs de mes popup (qui marchent parfaitement bien sous Firefox).
Le problème est que sous IE, mes popup n'ont plus accès a mon fichier javascript.
Voici mon code JS :
function afficherVille() { if(this.checked == true) { // this représente l'input de type checkbox sur lequel on a cliqué. var popup,el=this; popup = open("pages/ville.php", "_blank", "dependent=yes, height=250, width=600, location=no, top=150, left=150, menubar=no, resizable=no, scrollbars=no, status=no, toolbar=no"); popup.onload = function() { initialiserPopup(popup,el); } } }
var elPays;
function initialiserPopup(win,el) { elPays = win.document.getElementById("listePays"); win.document.forms[0].reset(); win.document.getElementById("code_postal").focus(); win.document.getElementById("pays").onkeyup = function() { rechercherPopup(win); } win.document.getElementById("ajouter").onclick = function() { verifierPopup(win,el); } }
function verifierPopup(win,el) { var msg="",i; if(win.document.getElementById("code_postal").value == "" || isNaN(win.document.getElementById("code_postal").value)) { msg += "Veuillez indiquer le code postal <br />"; } if(win.document.getElementById("ville").value == "") { msg += "Veuillez indiquer le nom de la ville <br />"; } if(win.document.getElementById("commune").value == "") { msg += "Veuillez indiquer le nom de la commune <br />"; } if(win.document.getElementById("province").value == "") { msg += "Veuillez indiquer le nom de la province <br />"; } if(win.document.getElementById("pays").value == "") { msg += "Veuillez indiquer le nom du pays <br />"; } if(msg!="") { win.document.getElementById("msg").innerHTML = msg; win.document.getElementById("msg").style.color = "red"; } else { el.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.value = win.document.getElementById("code_postal").value; el.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.value = win.document.getElementById("ville").value; el.parentNode.parentNode.childNodes[8].nextSibling.childNodes[5].value = win.document.getElementById("code_postal").value + " " + win.document.getElementById("ville").value; changeCouleur("init",el.parentNode.parentNode.childNodes[8].nextSibling.childNodes[5]); el.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.previousSibling.value = win.document.getElementById("commune").value; el.previousSibling.previousSibling.previousSibling.previousSibling.value = win.document.getElementById("province").value; el.previousSibling.previousSibling.value = win.document.getElementById("pays").value; win.close(); } }
|
|
Merci de votre aide. |