/    Sign up×
Community /Pin to ProfileBookmark

Thumbnail pop-up window

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 [url]http://www.larbmoo.com/test.htm[/url]

Thank you in advance during this silly season
Morrison

to post a comment
JavaScript

1 Comments(s)

Copy linkTweet thisAlerts:
@khalidali63Dec 20.2002 — 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
×

Success!

Help @Larbmoo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.16,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...