Les Allergies
Alimentaires
Posez votre question Signaler

Iframes et IE

passparla2 2Messages postés 22 février 2008Date d'inscription - Dernière réponse le 22 févr. 2008 à 13:57
bonjour,
je suis actuellement en train de construire un site en utilisant la balise <iframe>...
la méthode fonctionne très bien sous mozilla mais le contenu de la page cible ne s'affiche pas sous internet explorer...
petite vérification de la compatibilité des iframes avec ie : j'ai fait en vitesse une page index avec une iframe à l'interieure, une page test.htm à insérer dedans et ça fonctionne!
alors peut être que si je vous donne le code, une bonne âme pourrait me montrer du doigt la ou les fautes commises!
ça donne ça:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<!-- saved from url=(0014)about:internet -->
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>Bienvenue sur www.blabla.fr</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">td img {display: block;}body {
margin-top: 20px;
background-color: #333333;
}
</style>
<!--Fireworks CS3 Dreamweaver CS3 target. Created Thu Feb 21 11:33:49 GMT+0100 2008-->
<script type="text/javascript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}
//-->
</script>
</head>
<body onload="MM_preloadImages('images/boutons/bouton_acceuil2.png','images/boutons/bouton_contact2.png','images/boutons/bouton_trompe2.png')">
<table width="800" border="0" align="center" cellpadding="0" cellspacing="0">
<!-- fwtable fwsrc="index.png" fwpage="Page 1" fwbase="index.jpg" fwstyle="Dreamweaver" fwdocid = "412274407" fwnested="0" -->
<tr>
<td><img src="images/spacer.gif" width="194" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="522" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="84" height="1" border="0" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="1" border="0" alt="" /></td>
</tr>
<tr>
<td colspan="3"><img name="bandeau" src="images/bandeau.jpg" width="800" height="168" border="0" id="bandeau" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="168" border="0" alt="" /></td>
</tr>
<tr>
<td rowspan="2" background="images/menu_g.jpg"><table width="194" height="329" border="0">
<tr>
<td width="133" height="43"><div align="center"><a href="pages/accueil.htm" target="contenu" onmouseover="MM_swapImage('accueil','','images/boutons/bouton_acceuil2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/boutons/bouton_acceuil1.png" name="accueil" width="126" height="41" border="0" id="accueil" /></a></div></td>
<td width="51"> </td>
</tr>
<tr>
<td height="43"><div align="center"><a href="#" onmouseout="MM_swapImgRestore()" onmouseover="MM_swapImage('trompe','','images/boutons/bouton_trompe2.png',1)"><img src="images/boutons/bouton_trompe1.png" name="trompe" width="126" height="41" border="0" id="trompe" /></a></div></td>
<td> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="center"></div></td>
<td> </td>
</tr>
<tr>
<td><div align="center"><a href="pages/contact.htm" target="contenu" onmouseover="MM_swapImage('contact','','images/boutons/bouton_contact2.png',1)" onmouseout="MM_swapImgRestore()"><img src="images/boutons/bouton_contact1.png" name="contact" width="126" height="41" border="0" id="contact" /></a></div></td>
<td> </td>
</tr>
</table></td>
<td bgcolor="#000000">
<iframe name=contenu align=center marginwidth="0" marginheight="0" frameborder=no src="pages/accueil.htm" style="height:400px; width:500px; overflow: auto">
</iframe>
</td>
<td rowspan="2"><img name="menu_d" src="images/menu_d.jpg" width="84" height="473" border="0" id="menu_d" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="409" border="0" alt="" /></td>
</tr>
<tr>
<td><img name="bas" src="images/bas.jpg" width="522" height="64" border="0" id="bas" alt="" /></td>
<td><img src="images/spacer.gif" width="1" height="64" border="0" alt="" /></td>
</tr>
</table>
</body>
</html>
merci !
Lire la suite 

Iframes et IE »

Suggestions
2 réponses
Réponse
+0
moins plus
salu

ta oublier les guillemet sur cette ligne essai

<td bgcolor="#000000"><iframe name="contenu" align="center" marginwidth="0" marginheight="0" frameborder="no" src="pages/accueil.htm" style="height:400px; width:500px; overflow: auto"> </iframe></td>
passparla2- 22 févr. 2008 à 13:57
merci pour ta réponse!

j'ai fait la correction mais toujours le même résultat....
Ajouter un commentaire
Ce document intitulé « Iframes et IE » issu de CommentCaMarche (www.commentcamarche.net) est mis à disposition sous les termes de la licence Creative Commons. Vous pouvez copier, modifier des copies de cette page, dans les conditions fixées par la licence, tant que cette note apparaît clairement.
Dossier à la une
Passage au tout numérique : quel coût pour les particuliers ?