This script shows and positions a div
like:
function myfunction()
{
obj.style.visibility = "visible";
obj.style.width: "100%";
obj.style.height = "100%";
obj.style.position = "absolute";
obj.style.top: "0px";
obj.style.left: "0px";
obj.style.z-index = "44";
obj.focus()
}
and so on
<b onclick="myfunction()">Click here</b>
Of course it's a bit more than that, but this is to show you what I'm trying to do. This works well, the div fills the screen like it should.
The problem is when sometimes we display a lot of links so the user has to scroll.. when the div shows its always on the top of the page and the user gets scrolled up there when it gets focus. When the user is done and closes the div, he has to find his way back down the list where he was.
Is there any way to position the div relative to the browsers scroll position?