|
Posted by ScottRoot2 on 01/08/07 22:18
In a nutshell... I have this old .asp page with a ton of form elements
(and I mean a ton...don't look at me I didn't make the page).
This creates a huge headache. My job is to make the tabindex of the
elements order properly. Instead of going through manually and trying
to adjust 300+ tabindexes I just made a script which worked fine in FF:
window.onload=function()
{
var count=0;
for (var i=0; i< form.elements.length; i++)
{
var ele = form.elements[i];
if(ele.type != "hidden" && ele.disabled != true)
{
ele.setAttribute('tabindex',count);
ele.onclick = function()
{
alert(this.tabindex);
}
count++;
}
}
}
This didn't past properly, but if anyone can tell me what the problem
is, I'd greatly appreciate it. The alert is just debugging for me to
see if the tabindex was set, and it IS! If I click element #5 in the
order it is the 4 (0-based) tab index! But when I actually do my
tabbing, it is all out of wack!
Please help!
Navigation:
[Reply to this message]
|