Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Open window with white background?

Status
Not open for further replies.

jcalar

Technical User
Dec 29, 2000
7
US
I am using a Javascript function to open a small window containing a photo "onClick"; but without making an HTML page to go in there (I want it only to contain the JPEG & don't want to have the extra steps & files involved in making a separate HTML page for each photo, as there are many of them) -- I am wondering if I can make the background color of that new window white? The current description of the new window is:

window.open(html,"photo",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=270,height=235');

I've tried adding a "bkcolor" in there but that doesn't seem to work... any ideas??
 
Why dont you use a div with img tag in it and just keep replacing the source(image file name). That way you wouldnt need any window.opens and also you can have white background for the div tag. Badrinath Chebbi
 
isnt the color of the window already white? The pen is mightier than the sword.
 
Chebbi -- can you give me an example?

Dookie -- the default color (gray) shows up behind the photo.
 
this should work:
Code:
var newWindow = window.open(html,"photo",'toolbar=0,location=0,directories=0,status=0,menubar=0,scrollbars=no,resizable=0,width=270,height=235');
newWindow.document.bgColor = "white";
The pen is mightier than the sword.
 
No luck with that, the background is still gray. :(
 
I should have mentioned I'm checking this in Netscape. In IE, the background IS white already.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top