Click to See Complete Forum and Search --> : Openings two windows at once some problems.


iceafreak99
04-27-2003, 09:45 PM
Need some help here, I got this link

<a href="javascript:doit()">Open Two Windows</a>

That goes to this script..

<script>
function doit(){
var w = screen.width;
var h = screen.height/2;
var n=window.open("topwinf.html", "n","width="+w+",height="+screen.height/25);
n.moveTo(0,0);
var timer=window.open("topwin.html","timer","width="+w+",height="+screen.height*.85);
timer.moveTo(0, screen.height*.10);
}
</script>

Its already the correct size but this is what people are saying...

iceafreak99: click on green light
iceafreak99: 2 wins open
iceafreak99: how are they positioned?
notcheese88: pretty close to perfect
notcheese88: the small top window
notcheese88: is all the way up top
notcheese88: the 2nd window covers that small one a little
notcheese88: and takes up the rest of the screen
iceafreak99: what do u mean takes up the rest?
notcheese88: its the size of the rest of the screen

.. plus


iceafreak99: click on green light
iceafreak99: and the two windows that pop open are they positioned right?
skaterguy198: sorta
iceafreak99: is the top one half-way hidden?
skaterguy198: yes
skaterguy198: and its kinda big
iceafreak99: big?
skaterguy198: well it takes over my entire screen
skaterguy198: including lil one


.. plus this is the person who first helped me works for her not for me :(


iceafreak99: so close
iceafreak99: !
iceafreak99: its too small the top
god_loves_07: What do you mean, "so close"?
god_loves_07: It works.
iceafreak99: or something
iceafreak99: hold on
iceafreak99: I tried it on both red.
iceafreak99: res
iceafreak99: and
iceafreak99: it didnt work
iceafreak99: the top is cut off half way


If your wondering what Im trying to do. Im trying to open two windows the top and bottom window are above and below each other no gaps no oversize just fits perfectly in everyones screen.

Please help.

Andrew

iceafreak99
04-27-2003, 11:10 PM
Might look good but doesnt work for me :(

iceafreak99
04-28-2003, 07:25 AM
Anyone

smoker2
04-28-2003, 08:25 AM
You need to define the height of the windows.

Use the screen.width atribute for both windows

set the top window to open (for example) as 100 high and screen.width wide at position top="0" left ="0"

set the bottom window to open at position top="101" left ="0"
screen.width wide and (screen.height - 100) high

otherwise you are using the same screen values twice resulting in overlap


alan

iceafreak99
04-28-2003, 12:11 PM
Can you give me code for this im just a newbie :(

smoker2
04-28-2003, 01:26 PM
tkae a look at the files in the zip

You would have to mess around with the "myheight" variable in the bottom page, coz the resize doesn't take account of the taskbar in windoze