View Single Post
Sponsorlu Bağlantılar
Zoque.Forum
Advertisement
Old 21.10.2007   #5 (permalink)
$BABACAN
 
Üyelik Tarihi: 08.06.2007
Yer: Eskişehir
Mesaj: 32
Re: üzerine tıklayınca orjinal boyut

Cevabı buldum mutlakabirilerinin işine yarar.

Kod:
<script type="text/JavaScript">
<!--
var origin_width=0;
var max_width=800;
function adjustImage(init)
{
    if(document.getElementById("img_obj").width>max_width)
    {
        origin_width = document.getElementById("img_obj").width;
        document.getElementById("img_obj").width = max_width;
        document.getElementById("resized").style.display='';
    }
    else
    if(document.getElementById("img_obj").width<=max_width)
    {
        if(init==1) origin_width = document.getElementById("img_obj").width;
        document.getElementById("img_obj").width = origin_width;
        document.getElementById("resized").style.display='none';
    }
}
function autoResize(id){
    var newheight;
    if(document.getElementById){
        newheight=document.getElementById(id).contentWindow.document.body.scrollHeight;
    }
    document.getElementById(id).height= (newheight + 16) + "px";
}
-->
</script>
 
<script type="text/JavaScript">

function showNullImg(obj) {
	//obj.src ="http://127.0.0.1/my/aihsdev/skin/default/thumb_icons/thumb_small.png";
	//obj.width = obj.height = 100;
	return true;
}
function zoomimg(obj) {
	var zoom=parseInt(obj.style.zoom,10) || 100;
	zoom += event.wheelDelta / 24;
	imgW = obj.clientWidth*zoom/100;
	if (zoom>15 && imgW<1200) obj.style.zoom = zoom + "%";
	return false;
}
</script>

Burası da resminizin kaynağı

Kod:
<img src="Kaynak resim" name="img_obj" border=0 id=img_obj onclick="adjustImage()" onmousewheel="zoomimg(this)" onload="adjustImage(1)" onerror="showNullImg(this)"/>

Koaly gelsin.
$BABACAN şu an çevrimdışı   Mesajdan alıntı yaparak yeni bir cevap ekleyin