Documents load showing their bottom

We have put frames on our site and now have a problem with the auto-focusing of documents.

If we go to a long discussion group thread and click on a link at the bottom it will then load up the new page but the focus will remain at the bottom. Very annoying if you want to read what has been said.

Does anyone know how to change this behaviour ?

Tthanks

Paul

Subject: solved initial position but now can’t use page up or page down

I have fixed the initial problem I had however another one has come to light.

When a page loads in our iframe naturally the focus is on that frame. This frame doesn’t have scrollbars but is sized to its content. This means that when the users press ‘page up’ or page down’ there is no response. This is understandable as they are in a frame without scrollbars.

Is there a way around this ? I tried to trap the event.keycode but it doesn’t work for ‘page up’ or ‘page down’.

By the way the other fix was this in the onload:

window.scrollTo(0,0);

Thanks

Paul

Subject: ‘page up’ keystroke trapped but can it be transferred to another frame ?

in the onload of the frame i have this:top.frames[0].document.onkeydown = checkKeycode;

the function is this:

function checkKeycode(e)

{

var keycode;

if (window.frames[0].event) keycode = window.frames[0].event.keyCode;

else if (e) keycode = e.which;

alert("keycode: " + keycode);

if (keycode == "34")

{

alert("page down");

top.window.event.keyCode = 34;

}

}

This displays the alerts correctly but I can’t get it to transfer the page down ‘action’ to the main frame.

Can anyone correc this line ?

top.window.event.keyCode = 34;

Thanks

Paul

Subject: lateral thinking saved the day

I solved the problem by shifting the focus to the other window. It works because this is the onkeydown event.

Someone presses the keydown, I change the focus to the main page, the key comes up, fires the keyup event and the action takes place.

cheers

paul

function checkKeycode(e)

{

var keycode;

keycode = window.frames[0].event.keyCode;

if (keycode == "33" || keycode == "34" || keycode == "38" || keycode == "40")

{

window.focus();

}

}