|
Check it - we needed a script that would automatically resize an image in a pop-up window when you clicked on a link in another page. Make sense? Well, it as so easy, that we are gving it away! No matter what the size of the image is, the pop-up window will automatically resize showing you othe original image! SWEET AS!
<script language="javascript">
function madfish_popup(img){
photo1= new Image();
photo1.src=(img);
control(img);
}
function control(img){
if((photo1.width!=0)&&(photo1.height!=0)){
viewphoto(img);
}
else{
funizone="control('"+img+"')";
interval=setTimeout(funizone,20);
}
}
function viewphoto(img){
largh=photo1.width+1;
altez=photo1.height+1;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
}
</script>
<a href="javascript:madfish_popup('your_image_path')">
Easy as...just like we like it!
|
|