Je me prend la tête sur un truc depuis deux heures:
Code : Tout sélectionner
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr" lang="fr">
<head>
<title>Cours de Math 1er Année</title>
<link href="style/style.css" rel="stylesheet" type="text/css" />
<script type="text/javascript" src="script/function.js" />
</head>
<body onload="rcconf()">
<div class="Gtitre">
Cours de Mathematiques pour l'Informatique
</div>
<div class="paragraphe" id="p0.1">
<div class="titrepara" id="tp0.1" onclick="affiche_cache('rappel' , this.id ); "><img src="img/plus.gif" alt="Clickez pour voir" / height="16px"> 0.1 - Rappel des Bases</div>
<div id="rappel" >
<p>
deck<br />
deck
</p>
</div>
</div>
etc... etc...
Code : Tout sélectionner
function affiche_cache(id , thisid){
if ( document.getElementById(id).style.visibility == 'hidden' ){
affiche(id) ;
var contenuthisid = document.getElementById(thisid).innerHTML.replace( 'plus.gif' , 'moins.gif' ) ;
document.getElementById(thisid).innerHTML = contenuthisid ;
} else {
cache(id)
var contenuthisid = document.getElementById(thisid).innerHTML.replace( 'moins.gif' , 'plus.gif' ) ;
document.getElementById(thisid).innerHTML = contenuthisid ;
}
}
function affiche(id){
if ( document.getElementById && document.getElementById(id) != null ){
document.getElementById(id).style.visibility='visible';
document.getElementById(id).style.display='block';
}
}
function cache(id){
if ( document.getElementById && document.getElementById(id) != null ){
document.getElementById(id).style.visibility='hidden';
document.getElementById(id).style.display='none';
}
}
function rcconf(){ //C'est la fonction qui est chargée a chaque chargement de la page
cache('rappel');
}
Sous FireFox, tout va bien, mais sous IE, j'ai une belle page blanche...
Si j'enleve le JS de mon code html, ça s'affiche sous IE...
Si quelqu'un à une idée... je suis preneur...!