There is a TABINDEX attribute in HTML that should dictate where the cursor goes when you tab through a page. I have not had much luck with it, however.
In Internet Explorer, you can use the keyCode attribute of the event object to check for tab and respond accordingly:
Code:
<script>
function tabNext()
{
if(event.keyCode == <whatever it is for TAB>)
{
<put focus where I want it>
return false;
}
else
{
return true;
}
</script>
...
<input type='text' onkeydown = 'tabNext()' />
Other browsers have other ways of capturing a key (like a TAB), so if you need to be cross-browser friendly, you'll want to look into those as well. Their methods will be similar to this.
Dave
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ O Time, Strength, Cash, and Patience!
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.