<body onload=function(){document.getElementById("place_holder").src =document.getElementById("imgurl").value;} >
<script>
function ResizeThem() {
maxheight=250;
maxwidth= 250;
imgs=document.getElementsByTagName("img");
for (p=0; p<imgs.length; p++) {
if (imgs[p].getAttribute("alt")=="user posted image") {
w=parseInt(imgs[p].width);
h=parseInt(imgs[p].height);
if (parseInt(imgs[p].width)>maxwidth) {
imgs[p].style.cursor="pointer";
imgs[p].setAttribute('alt','Reduced Image - Click to see full size');
imgs[p].onclick=new Function("document.getElementById('imgurl').value = this.src; iw=document.getElementById('this.src','viewer')open();iw.focus()");
imgs[p].height=(maxwidth/imgs[p].width)*imgs[p].height;
imgs[p].width=maxwidth;
}
if (parseInt(imgs[p].height)>maxheight) {
imgs[p].style.cursor="pointer";
imgs[p].onclick=new Function("document.getElementById('imgurl').value = this.src; iw=document.getElementById('this.src','viewer')open();iw.focus()");
imgs[p].width=(maxheight/imgs[p].height)*imgs[p].width;
imgs[p].height=maxheight;
}
}
}
}
ResizeThem();
</script>
<input type="hidden" id="imgurl">
<div id="Viewer" visibility="hidden" width="500" height="500" overflow="auto" >
<script type="text/javascript">window.onload = function(){document.getElementById("place_holder").src = window.opener.document.getElementById("imgurl").value;}
</script>
<center><img src="http://i14.photobucket.com/albums/a345/Instar/please_do_not_hotlink.gif" id="place_holder"></center>
<align="right"><form method="post">
<input type="text" value="Close Window X"
onclick="window.close()">
</form></align>
</div>
css
#viewer
{background-image:url(http://i14.photobucket.com/albums/a345/Instar/greenbgfade17oi.jpg);}
Inny 1 Posting Whiz in Training
ShawnCplus 456 Code Monkey Team Colleague
Inny 1 Posting Whiz in Training
Inny 1 Posting Whiz in Training
peter_budo 2,532 Code tags enforcer Team Colleague Featured Poster
Inny 1 Posting Whiz in Training
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.