Re: radio buttons in the iwebbrowser control

From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 09/27/04


Date: Mon, 27 Sep 2004 11:05:30 -0400


"John Seganakis" <segy@ezfiling.com> wrote in message
news:uzjfJAKpEHA.3876@TK2MSFTNGP15.phx.gbl
> I have parsed thru the element on the page with the radio buttons and
> have located the control name, however in script each button is tagged
> separately, while cycling thru the control elements only seems to
> provide the first button. I can check and do anything I like with the
> first button, but how do I get to the next one?

What do you use to "cycle" through them? Note that all radio button
controls typically have the same name (that's how you indicate that they
belong to one mutually exclusive group). For example, you can get all
radio buttons with the same name like this:

var allRadios = document.all("radioName");
for (var i = 0; i < allRadios.length; ++i)
{
    var radio = allRadios(i);
    // Do something
}

-- 
With best wishes,
    Igor Tandetnik
"On two occasions, I have been asked [by members of Parliament], 'Pray,
Mr. Babbage, if you put into the machine wrong figures, will the right
answers come out?' I am not able to rightly apprehend the kind of
confusion of ideas that could provoke such a question." -- Charles
Babbage