Focus question

Given a div:

1 with fixed height and width
2. overflow = auto
3. filled with enough text so that it shows a scrollbar

If I click on it, it gets a kind of pseudo-focus, and then I can control the text position from the keyboard with the usual keys (pgup, pgdn, home etc.).

If I click away from this div, then those keys no longer control its text position.

Now, suppose I have a page with a div like this, then the question is how can I give this div the pseudo-focus described above progrmatically (i.e. without clicking on it). I promise you, document.getElementById(‘myDiv’).focus(); does NOT do the job.

Any ideas?

Thanks,

JAS

This looks similar

btw, good question.