Hallo
Ich habe das Script nochmal überarbeitet und poste es hier mal für's archiv:
popup.html
<html>
<head>
<title>popup</title>
<script>
function resize() {
window.resizeTo(document.bild.width, document.bild.height);
}
</script>
</head>
<body>
<script>
var url = window.location.href.split("?");
document.open();
document.write("<img name="bild" style="position:absolute; top:0px; left:0px" src="" + url[1] + "" onLoad="resize()">");
document.close();
</script>
</body>
</html>
test.html
<html>
<head>
<title>test</title>
<script>
var extension = "big";
function popup(bild) {
var tokens = bild.src.split(".");
var bbild = tokens.slice(0,tokens.length - 1).join(".") + "." + extension + "." + tokens[tokens.length - 1];
var win = open("popup.html?" + bbild,"popup","menubar=no,resizable=no,status=no,locationbar=no,height=200,width=200");
win.focus();
}
</script>
</head>
<body>
<a href="#" onclick="popup(document.bild1); return false"><img name="bild1" border="0" src="test.gif"></a><br>
<a href="#" onclick="popup(document.bild2); return false"><img name="bild2" border="0" src="test2.gif"></a>
</body>
</html>
Die letzte Version war nicht ganz zuverlässig.
Gruß
Daniel