develooper Front page | perl.libwww | Postings from January 2006

RE: Setting radio buttons with WWW::Mechanize

Thread Previous
Dhanashri Bhate
January 1, 2006 22:32
RE: Setting radio buttons with WWW::Mechanize
Message ID:
Lets see one example. 

Suppose a page asks user preference of either text or HTML for opening
something. So the form will show 2 buttons and associated text may be "Text"
and "HTML". And a button "Select". 

The values associated with the radio buttons may be different that this
text. You can get the radio button field name and values from the HTML
source. ( the way I do it is open the webpage in Mozilla and see Page Info,
this will clearly show you the radio button info i.e. name and values ) 

So say in this case, the radio button field "filetype" can have any of these
two values "txt" and "htm" .

Then to select option "Text", your code will have the following:

form_number => 1,
fields      => { filetype=>'txt'},
button	=> 'Select',

-----Original Message-----
From: Christopher Hart [] 
Sent: Saturday, December 31, 2005 6:54 AM
Subject: Setting radio buttons with WWW::Mechanize

I feel like this is a dumb question, but I haven't been able to figure
it out:  How does one set the value of radio buttons using


Thread Previous Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at | Group listing | About