I'm using a slideshow script with function window.open to enlarge the photos in a new window.
is there a property for window.open like align, or center or something?
this is the script I'm using:
var Bild = new Array(6);
Bild[0] = new Image(); Bild[0].src="images/fotos/1.jpg";
Bild[1] = new Image(); Bild[1].src="images/fotos/2.jpg";
Bild[2] = new Image(); Bild[2].src="images/fotos/3.jpg";
Bild[3] = new Image(); Bild[3].src="images/fotos/4.jpg";
Bild[4] = new Image(); Bild[4].src="images/fotos/5.jpg";
Bild[5] = new Image(); Bild[5].src="images/fotos/6.jpg";
Bild[6] = new Image(); Bild[6].src="images/fotos/7.jpg";
var zeige = 1;
function show(){
var Preview = window.open( document.suzuki.src , 'Preview',
'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=n o,width=520,height=418,screenX=0,screenY=0');
Preview.document.body.style.textAlign="center";
}
oh BTW I have not tested it.so keep a backup of your original code..just in case..:D
nope, not woking, thou sounds good. I'll check the other thread now. do u want the url to the site so you have a better look?
Supergirl
06-10-2003, 11:31 AM
Originally posted by pyro
Is this what you need? http://www.infinitypages.com/research/centeredpopup.htm
nope, this ist just a pop up in the middle of my screen. thx anyway.
I want my graphic to be centered in the new window. I have a kind of frame on the left and top now. if I make the window smaller, my picture gets cut on the right and bottom, but the frame on the left and top is still there.
pyro
06-10-2003, 11:39 AM
Oops... Missunderstood what you were looking for... :p
I think the problem is that you are opening a new window, but that window only contains the image, no html. This is more than likely why Khalid's suggestion did not work.
Try this (untested):
function show(){
var Preview = window.open('', 'Preview', 'toolbar=no,location=no,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,copyhistory=n o,width=520,height=418,screenX=0,screenY=0');
Preview.document.write('<html><head><style type="text/css">body {text-align: center;}</style></head><body><img src="'+document.suzuki.src+'"></body></html>');
}Note: You will have to take out some of the breaks that the forums applied...
Supergirl
06-10-2003, 11:46 AM
this looks good too. I now have a html text inside my popup, though object is still not centered.
I have NO experience with css. do I have to make another
adjustments too?