Click to See Complete Forum and Search --> : Thumbnail pop-up window


Larbmoo
12-19-2002, 05:15 PM
I am using a popup window to open a thumbnail picture, the thing I need some advice with is, "How do I specify the background colour for the pop-up?" Everything else works fine.
Any advice

<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function Zoom(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+20;
altez=foto1.height+20;
stringa="width="+largh+",height="+altez;
finestra=window.open(img,"",stringa);
}
// End -->
</script>

</head>

<body bgcolor="#CCFFCC">
<div align="center"> <A HREF="javascript:Zoom('/images/site.gif')" bgcolor="#994433" >
<IMG SRC="/images/site.gif" BORDER="0" width="49" height="31"></A> </div>


<p><center>
</center>
</body>
</html>


See how it works here http://www.larbmoo.com/test.htm

Thank you in advance during this silly season
Morrison

khalidali63
12-19-2002, 06:30 PM
in the function

viewFoto(img)

after the line

finestra=window.open(img,"",stringa);

adthe following line
finestra.document.bgColor="lighyellow";

or any other color which you desire

cheers

Khalid