j'ai crée un petit site web www.arnauld.fr qui s'affiche bien dans IE mais pas dans Firefox.
Voici le problème :
-le menu appelle dans un iframe divers documents (images, php, pages web).
-cet iframe a une largeur fixe (ok) mais une longueur qui s'adapte automatiquement au contenu grâce à un javascript.
Le problème est là, sous Firefox ce javascript ne fonctionne pas donc la hauteur de l'iframe ne bouge pas.
Je voudrais résoudre ce problème.
Code : Tout sélectionner
<p>
<script language="JavaScript">
function iFrameHeight() {
if(document.getElementById && !(document.all)) {
h =
document.getElementById('iframename').contentDocument.body.scrollH
eight;
document.getElementById('iframename').style.height = h;
}
else if(document.all) {
h = document.frames('iframename').document.body.scrollHeight;
document.all.iframename.style.height = h;
}
}
</script>
<iframe name="liens" onLoad="iFrameHeight();" src="intro.htm" scrolling="no"
scroll="auto" id="iframename" marginwidth="0" marginheight="0"
frameborder="0" style="width:100%;" height=800></iframe>
</p>
Arnauld