Forum Moderators: open
if i have a DIV with scrollbar enabled,when i click on Div,dIV is focused then i can use arrow keys for scrolling up and down.
is there anyway to use my own function to:
1)focus the div
2)executing my own function on pressing Arrow keys as well as it scroll downs div?
thanks
Not sure what you mean, but I hope this helps:
<body onload="window.test.focus()">
<div id="test" style="height: 50px; overflow: auto;">
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog. The quick brown fox jumps over the lazy dog.
</div>
HTH, AA