there is actually a very "cute" way to do this in internet explorer using
documment.all; IE4+
not tested but should work
<script>
function InArray(Arr, Str)
{
for(var i=0;i<Arr.length;i++) {
if(Arr[i] == Str) return true;
}
return false;
}
var AllTagNameElements = new Array("input", "select", "button"); // stop at
tags with the following tagName values
// add or subtract values from the above array as necessary
window.onload = function()
{
for(var i=0;i<document.all.length;i++)
{
if(InArray(AllTagNameElements,
document.all[i].tagName))document.all[i].onkeydown = doNav;
}
}
function doNav()
{
// this func only goes forward, to go backkward change the if condition
to if(i <= 0) return; and chage ++i to --i
// it goes without saying that you need to check the event.keyCode to
figure out which key was pressed so as
// to figure out which way to go
var i = event.srcElement.sourceIndex;
while(!InArray(AllTagNameElements, document.all[++i].tagName)){if(i >=
document.all.length) return;}
document.all[i].focus();
}
</script>
hope your script doesn't have to be compatible with NS
etan
> Hi all experts here,
>
[quoted text clipped - 7 lines]
> Thank you very much.
> lichunlin, China
lcl - 30 Jul 2003 01:36 GMT
Thank you very much, I will test it soon.
All our clients use IE, and I saw bill is laughing.
"Etan Bukiet" <ebukiet@comcast.net> дÈëÏûÏ¢ÐÂÎÅ
:e24J$FhVDHA.1512@TK2MSFTNGP11.phx.gbl...
> there is actually a very "cute" way to do this in internet explorer using
[quoted text clipped - 49 lines]
> > Thank you very much.
> > lichunlin, China