- Joined
- 2 Mar 2002
- Messages
- 1,572
I have this code ... which when called pops up a bigger version of an image and resizes the a new window according to the size of the image.
------
<SCRIPT language="JavaScript">
<!-- Begin
function CaricaFoto(img){
foto1= new Image();
foto1.src=(img);
Controlla(img);
}
function Controlla(img){
if((foto1.width!=0)&&(foto1.height!=0)){
viewFoto(img);
}
else{
funzione="Controlla('"+img+"')";
intervallo=setTimeout(funzione,20);
}
}
function viewFoto(img){
largh=foto1.width;
altez=foto1.height;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
}
// End -->
//-->
</script>
-------
My problem is that the top and left edges of the window that pops up stilll has a bit of blank space. Anyone know how I could fix this? If anyone has code that does the exact same thing I'm trying to do, but better ... I'd appreciate it if you shared it with me.
------
<SCRIPT language="JavaScript">
<!-- Begin
function CaricaFoto(img){
foto1= new Image();
foto1.src=(img);
Controlla(img);
}
function Controlla(img){
if((foto1.width!=0)&&(foto1.height!=0)){
viewFoto(img);
}
else{
funzione="Controlla('"+img+"')";
intervallo=setTimeout(funzione,20);
}
}
function viewFoto(img){
largh=foto1.width;
altez=foto1.height;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
}
// End -->
//-->
</script>
-------
My problem is that the top and left edges of the window that pops up stilll has a bit of blank space. Anyone know how I could fix this? If anyone has code that does the exact same thing I'm trying to do, but better ... I'd appreciate it if you shared it with me.