two time, one time, one size, two size, one pic, two pic - Programmers Heaven

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

two time, one time, one size, two size, one pic, two pic

Hadji_13Hadji_13 Posts: 274Member
Hi, I've got a problem with some code.
It should open a window with two images in, that what the php page it's calling has, the two images passed to it.
The problem I'm having is that the window never opens the right size the first time you view it in a session, if you close the pop up window and click the link again, it works.
I'm trying to add the sizes of the pictures in the argument, but for some reason, on the first time it only opens to the size of the first image.
Anyone to shed any light?

This is the code

[code]
function twolayouts(img1,img2)
{
foto1= new Image();
foto1.src=(img1);
foto2= new Image();
foto2.src=(img2);

largh=foto1.width+foto2.width+20;
if(foto1.height>foto2.height)
{
altez=foto1.height+20;
}
else
{
altez=foto2.height+20;
}
page="twolayouts.php?img1="+img1+"&img2="+img2;
stringa="width="+largh+",height="+altez;
finestra=window.open(page,"",stringa);

}
[/code]
----------------------------------------------------
The solution to the problem changes the problem
Sign In or Register to comment.