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 TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Size of new window

Status
Not open for further replies.

elck

Programmer
Apr 19, 2004
176
NL
Hello,
Code:
function CyOpen(a,y1) {
S = "window.html?../fotos/a" + a;
X=window.open(S ,"sill","width=500,height=" + y1    + ",top=10,left=10,resizeable=yes,scrollbars=yes")
X.focus()

My problem with this code is, that it seems to always open the window with the height that I defined the first time I opened the window.

Changeing y1 does not change the height of the window.
Even after the window was closed.
Where do I go wrong or what solution do you have?


 
It should open up with whatever value you supply as y1. If I were you the thing I would look for is to ensure you are passing the correct value, your function may not be getting the value you think it's getting. Do this to ensure that the value is changing:

Code:
function CyOpen(a,y1) {
S = "window.html?../fotos/a" + a;
[COLOR=red][b]alert(y1);[/b][/color]
X=window.open(S ,"sill","width=500,height=" + y1    + ",top=10,left=10,resizeable=yes,scrollbars=yes")
X.focus()

-kaht

How much you wanna make a bet I can throw a football over them mountains?
sheepico.jpg
 
That was not the problem,
it appears that I closed the wrong window.
Manualy closing the window does not help,
but explicitly closing : X.close() (with a global var X=new Object) seems to work.
Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top