[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Mechanize and Radiobuttons

barjunk

8/11/2006 4:07:00 PM

I have found Mechanize fairly intuitive and easy to use. (after
learning some HTML! :)) and wondered if I'm doing something wrong when
using radiobuttons.

There are two radio buttons on the form I am working with and wondered
if when I set the second button

forms.radiobuttons[1].checked=true

It leaves radiobuttons[0] (the default button on the form) checked
value as true as well.

It's no problem to just set the originally set radiobutton
forms.radiobuttons[0]=false, but since that's not how a radio button
control would work in a browser, I thought I might be doing something
wrong.

Thanks for producing such an awesome tool!

Mike B.

1 Answer

Alex LeDonne

8/14/2006 3:39:00 PM

0

On 8/11/06, barjunk <barjunk@attglobal.net> wrote:
> I have found Mechanize fairly intuitive and easy to use. (after
> learning some HTML! :)) and wondered if I'm doing something wrong when
> using radiobuttons.
>
> There are two radio buttons on the form I am working with and wondered
> if when I set the second button
>
> forms.radiobuttons[1].checked=true
>
> It leaves radiobuttons[0] (the default button on the form) checked
> value as true as well.
>
> It's no problem to just set the originally set radiobutton
> forms.radiobuttons[0]=false, but since that's not how a radio button
> control would work in a browser, I thought I might be doing something
> wrong.
>
> Thanks for producing such an awesome tool!
>
> Mike B.
>

That's probably an HTML problem in the form. See
http://www.w3schools.com/html/html... for an example. Note that
the name attribute must be set to the same string for each button in
the group.

-A