Bonjour,
Mon probleme est que mon code fonctionne sous FF mais pas sous IE, ca m'arrive tous le temps quel perte de temps sa me gonfle.
Enfin c'est comme ca.
Le probleme vien du code JS
"texte = file(lienverscode); "
sur cette ligne si je ne me trompe
"xhr_object.open("GET", fichier, false);"
Je vous met ci-joint tous mon code.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr" lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<script type="text/javascript">
function getXhr(){
var xhr = null;
if(window.XMLHttpRequest) // Firefox et autres
xhr = new XMLHttpRequest();
else if(window.ActiveXObject){ // Internet Explorer
try {
xhr = new ActiveXObject("Msxml2.XMLHTTP");
} catch (e) {
xhr = new ActiveXObject("Microsoft.XMLHTTP");
}
}
else { // XMLHttpRequest non supporté par le navigateur
alert("Votre navigateur ne supporte pas les objets XMLHTTPRequest...");
xhr = false;
}
return xhr
}
function writediv(texte)
{
document.getElementById('corps').innerHTML = "coucou";
}
function FenetreCorpsAJAX(lienverscode)
{
alert(lienverscode);
texte = file(lienverscode);
writediv(texte);
}
function file(fichier)
{
xhr_object =getXhr();
xhr_object.open("GET", fichier, false);
xhr_object.send(null);
if(xhr_object.readyState == 4) return(xhr_object.responseText);
else return(false);
}
</script>
</head>
<body bgcolor="#FFFFFF" leftmargin="0" topmargin="0" marginwidth="0" marginheight="0">
<!-- ImageReady Slices (Sans titre-3.psd) -->
<table id="Tableau_01" border="0" cellpadding="0" cellspacing="0">
<tr>
<td colspan="3">
<img src="images/Sans-titre-3_01.gif" width="800" height="136" alt=""></td>
</tr>
<tr>
<td rowspan="2">
<img src="images/Sans-titre-3_02.gif" width="589" height="26" alt=""></td>
<td>
<img src="images/index_03.gif" name="toto"width="202" height="21"
alt=""
onmouseover="document.images['toto'].src='images/Boutton3_03.gif'"
onmouseout="document.images['toto'].src='images/index_03.gif'"
onclick="FenetreCorpsAJAX('FormConnexion.html')"
></td>
<td rowspan="2">
<img src="images/Sans-titre-3_04.gif" width="9" height="26" alt=""></td>
</tr>
<tr>
<td>
<img src="images/Sans-titre-3_05.gif" width="202" height="5" alt=""></td>
</tr>
<tr>
<td colspan="3">
</td>
</tr>
</table>
<div id="corps" >
</div>
<!-- End ImageReady Slices -->
</body>
</html>