Mechanize and Radiobuttons

Discussion in 'Ruby' started by barjunk, Aug 11, 2006.

  1. barjunk

    barjunk Guest

    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.
     
    barjunk, Aug 11, 2006
    #1
    1. Advertising

  2. barjunk

    A LeDonne Guest

    On 8/11/06, barjunk <> 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_forms.asp for an example. Note that
    the name attribute must be set to the same string for each button in
    the group.

    -A
     
    A LeDonne, Aug 14, 2006
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Sean
    Replies:
    1
    Views:
    390
    Ken Cox [Microsoft MVP]
    Aug 6, 2003
  2. tshad

    Datalist and Radiobuttons

    tshad, Jun 23, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    396
    tshad
    Jun 23, 2005
  3. Alex D.

    about TreeView and radiobuttons

    Alex D., Oct 12, 2005, in forum: ASP .Net
    Replies:
    0
    Views:
    345
    Alex D.
    Oct 12, 2005
  4. =?Utf-8?B?cm9kY2hhcg==?=

    Panels, DropDownLists,RadioButtons and Bears

    =?Utf-8?B?cm9kY2hhcg==?=, Aug 21, 2006, in forum: ASP .Net
    Replies:
    0
    Views:
    361
    =?Utf-8?B?cm9kY2hhcg==?=
    Aug 21, 2006
  5. Guest

    Gridview and Radiobuttons

    Guest, Apr 28, 2008, in forum: ASP .Net
    Replies:
    0
    Views:
    349
    Guest
    Apr 28, 2008
Loading...

Share This Page