reinprecht
Neues Mitglied
Hey Leute
Habe im World Wide Web ein Script gefunden das mir inerhalt eines Frames ein Foto auf die größe des Frames streckt ich habe das in 2 verschiedenen Frames ausprobiert. Aber lustiger weiße funktioniert es in einem davon nicht .... wisst ihr vllt wo hier der fehler ist ?

Code:
[FONT="]<html>[/FONT]
[FONT="] <head>[/FONT]
[FONT="] <title></title>[/FONT]
[FONT="] <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">[/FONT]
[FONT="] </head>[/FONT]
[FONT="] <body bgcolor="yellow">[/FONT]
[FONT="] <script language="JavaScript">[/FONT]
[FONT="] function makeIm() {[/FONT]
[FONT="] NS4=(document.layers);[/FONT]
[FONT="] IE4=(document.all);[/FONT]
[FONT="] scaleWidth = true;[/FONT]
[FONT="] scaleHeight = true;[/FONT]
[FONT="] imSRC = "BILD.JPG";[/FONT]
[FONT="] if (NS4) {[/FONT]
[FONT="] origWidth = innerWidth;[/FONT]
[FONT="] origHeight = innerHeight;}[/FONT]
[FONT="] function reDo() {[/FONT]
[FONT="] if (innerWidth != origWidth || innerHeight != origHeight)[/FONT]
[FONT="] location.reload();}[/FONT]
[FONT="] if (NS4) onresize = reDo;[/FONT]
[FONT="] if (IE4) onresize = reDoIE;[/FONT]
[FONT="] function reDoIE(){[/FONT]
[FONT="] imBG.width = document.body.clientWidth;[/FONT]
[FONT="] imBG.height = document.body.clientHeight;}[/FONT]
[FONT="] winWid = (NS4) ? innerWidth : document.body.clientWidth;[/FONT]
[FONT="] winHgt = (NS4) ? innerHeight : document.body.clientHeight;[/FONT]
[FONT="] imStr = "<div id=elBGim"[/FONT]
[FONT="] + " style='position:absolute;left:0;top:0;z-index:-1'>"[/FONT]
[FONT="] + "<img name='imBG' border='0' src="+imSRC;[/FONT]
[FONT="] if (scaleWidth) imStr += " width="+winWid;[/FONT]
[FONT="] if (scaleHeight) imStr += " height="+winHgt;[/FONT]
[FONT="] imStr += "></div>";[/FONT]
[FONT="] document.write(imStr);}[/FONT]
[FONT="] makeIm();[/FONT]
[FONT="] </script>[/FONT]
[FONT="] </body>[/FONT]
[FONT="]</html>[/FONT]