Bonjour,
J'utilise ce script dans un iframe pour redimensionner celle-ci en fonction de son contenu. Ca marche très bien sur IE et Firefox (PC et MAC), mais pas sous Safari (v2).
Une idée sur l'adaptation a faire?
var myIframe = parent.document.getElementById(id);if (myIframe)
{
if (myIframe.contentDocument && myIframe.contentDocument.body.offsetHeight)
{
// W3C DOM (and Mozilla) syntax
myIframe.height = myIframe.contentDocument.body.offsetHeight+10;
}
else if (myIframe.Document && myIframe.Document.body.scrollHeight)
{
// IE DOM syntax
myIframe.height = myIframe.Document.body.scrollHeight+10;
}
}