I am trying to use various javascript tools, all of which work in NN, to
work in IE.
Here's my latest annoyance.
I get a list of all objects on a page using
docContents = document.getElementsByTagName("*");
for (var i=0; i < docContents.length; i++) {
if (docContents[i].type == 'text' ||
docContents[i].type == 'textarea' ||
docContents[i].type == 'radio' ||
docContents[i].type == 'checkbox' ||
docContents[i].type == 'select-one' ||
docContents[i].type == 'select') {zmaxv++;}
}
I then select an object to switch focus to. I can use the focus()
method for text objects, select list objects, but not radio buttons.
Why not?
To switch focus, I say
docContents[dCitems[curpos]].focus();
where dCitems contains the position in the array. This works fine, BTW,
for everything but radio objects.
I also tried
document.getElementByName('_sex')[0].focus();
here again I get the problem of the focus not being allowed for this
radio object.
Thoughts? Suggestions?