js-Datei:
Code: Select all
function iFrameHeight() {
var h = 0;
if ( !document.all ) {
h = document.getElementById('blockrandom').contentDocument.height;
document.getElementById('blockrandom').style.height = h + 60 + 'px';
} else if( document.all ) {
h = document.frames('blockrandom').document.body.scrollHeight;
document.all.blockrandom.style.height = h + 20 + 'px';
}
}
Code: Select all
echo "<__script__ src=\"http://yourdomain.com/cms/js/autoheight.js\" type=\"text/javascript\"></__script>";
echo "<__iframe onload=\"iFrameHeight()\" id=\"blockrandom\" name=\"iframe\" src=\"" . $params['url'] . "\" width=\"100%\" height=\"500\" scrolling=\"auto\" align=\"top\" frameborder=\"0\" class=\"wrapper\">Leider unterstützt Ihr Browser keine iFrames</iframe>";
echo "<a href=\"javascript:history.go(-1)\">[ Zurück zu " .$params['title']. " ]</a>";
Code: Select all
{iframe url='http://yourdomain.com/yourfile.php' title='yourtitle'}