yemre
08/08/2002, 19:24
size hoş bir javascript daha yolluyorum şahin abi gerçi bi alan açacaktı scriptler için ama olsun bunu paylaşmak istedim....
bu script sayesinde içinde sadece image olan sayfalar tam imajın boyutunda açılıyor siz ne kadar width height versenizde sayfa tam resim boyutunu otomatik alıyor....
en temiz kullanımı window open yöntemi ile scrollsuz mucrollsuz açmak....
---------------------------------------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth - document.images[0].width);
height = 500 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);
}
}
// End -->
</script>
<body onLoad="fitWindowSize()">
<div style="position:absolute; left:0px; top:0px">
<img src="1.jpg">
</div>
</body>
bu script sayesinde içinde sadece image olan sayfalar tam imajın boyutunda açılıyor siz ne kadar width height versenizde sayfa tam resim boyutunu otomatik alıyor....
en temiz kullanımı window open yöntemi ile scrollsuz mucrollsuz açmak....
---------------------------------------------------------------------------------
<SCRIPT LANGUAGE="JavaScript">
var isNav4, isIE4;
if (parseInt(navigator.appVersion.charAt(0)) >= 4) {
isNav4 = (navigator.appName == "Netscape") ? 1 : 0;
isIE4 = (navigator.appName.indexOf("Microsoft") != -1) ? 1 : 0;
}
function fitWindowSize() {
if (isNav4) {
window.innerWidth = document.layers[0].document.images[0].width;
window.innerHeight = document.layers[0].document.images[0].height;
}
if (isIE4) {
window.resizeTo(500, 500);
width = 500 - (document.body.clientWidth - document.images[0].width);
height = 500 - (document.body.clientHeight - document.images[0].height);
window.resizeTo(width, height);
}
}
// End -->
</script>
<body onLoad="fitWindowSize()">
<div style="position:absolute; left:0px; top:0px">
<img src="1.jpg">
</div>
</body>