View Full Version : Popup window
ConfusedOfLife
08-28-2002, 10:46 AM
I'm trying to put a layer in the bottom of my window that only when the user clicks on a button, it comes up from the bottom of the page like it's a popup window! I get the height of the window by "document.body.clientHeight" and then I set my absolute positioned div's bottom property to the number that I got from the previous command, subtracted by for example 100 that's the height of my div, the problem is that it itself makes the scrollbars that I don't wana have on my page, is there a way that I can do this without the scrollbars comming on the page?
A1ien51
08-28-2002, 04:57 PM
after you call the function, you can do this
document.body.overflow="hidden";
that will hide the scrollbars for ya
A1ien51
ConfusedOfLife
08-29-2002, 12:05 AM
I don't know if I got you right, you mean something like this:
<body>
<div id="oID" style="position : absolute; top : 30px">
A test.
</div>
<script>
X = document.body.clientHeight;
document.getElementById("oID").style.top = X;
document.body.overflow="hidden";
</script>
</body>
Well, then if it's what you mean, it doesn't work in my computer.
A1ien51
08-29-2002, 12:28 AM
i was typing to fast there...lol
document.body.style.overflow="hidden"
sorry about that
vBulletin® v3.8.2, Copyright ©2000-2012, Jelsoft Enterprises Ltd.