E.T. Phone Home
The 411...
What we do...
Our peeps...
Our newest V.I.P.'s
Hot off the press...
Studio magic...
Peep feedback...
Our digits...
Chat live now...
Back home...

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!

First, copy the following code and paste it between the <head> </head> tags in your site.

<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>

Now, when you link your image, use the following bit of code -

<a href="javascript:madfish_popup('your_image_path')">

Easy as...just like we like it!

copyright 2001 - 2008 - studio madfish limited - all rights reserved - legal mumbo jumbo - blog - web mail - 100% kiwi