Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Ruby > Mechanize and Radiobuttons

Reply
Thread Tools

Mechanize and Radiobuttons

 
 
barjunk
Guest
Posts: n/a
 
      08-11-2006
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.

 
Reply With Quote
 
 
 
 
A LeDonne
Guest
Posts: n/a
 
      08-14-2006
On 8/11/06, barjunk <(E-Mail Removed)> 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

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Gridview and Radiobuttons ASP .Net 0 04-28-2008 07:34 PM
Panels, DropDownLists,RadioButtons and Bears =?Utf-8?B?cm9kY2hhcg==?= ASP .Net 0 08-21-2006 07:55 PM
about TreeView and radiobuttons Alex D. ASP .Net 0 10-12-2005 05:20 PM
Datalist and Radiobuttons tshad ASP .Net 0 06-23-2005 05:10 PM
Radiobuttons and textbox with autopost Sean ASP .Net 1 08-06-2003 12:32 AM



Advertisments