logo       

RE: Setting radio buttons with WWW::Mechanize: msg#00000

Subject: RE: Setting radio buttons with WWW::Mechanize
Hi,
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:

$mech->submit_form(     
form_number => 1,
fields      => { filetype=>'txt'},
button  => 'Select',
);


-----Original Message-----
From: Christopher Hart [mailto:hartct@xxxxxxxxx] 
Sent: Saturday, December 31, 2005 6:54 AM
To: libwww@xxxxxxxx
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
WWW::Mechanize?

Thanks,
Chris




<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

Recently Viewed:
audio.irate.dev...    yellowdog.gener...    ietf.ips/2002-0...    xfree86.fonts/2...    busybox/2003-07...    emacs.jdee/2004...    linux.mandrake....    hardware.microc...    user-groups.lin...    science.analysi...    version-control...    db.filemaker.de...    cluster.openmos...    mail.eyebrowse....    text.xml.xerces...    kde.devel.kwrit...    finance.moneyda...    gcc.regression/...    network.routing...    os.freebsd.deve...    recreation.radi...    qnx.openqnx.dev...    python.xml/2002...   
Home | blog view | USPTO Patent Archive | advertise | OSDir is an inevitable website. super tiny logo

Free Magazines

Cisco News
Receive a free quarterly e-newsletter with exclusive articles on how Cisco IT uses its own products and solutions to enable the business.
subscribe

Systems Management News, the newspaper for IT systems administration and data center managers! Each issue of Systems Management News is chock-full of news and analysis to help you understand what's happening in your field.
subscribe

The Enterprise Newsweekly eWeek is the essential technology information source for builders of e-business.
subscribe

Oracle Magazine Oracle Magazine contains technology strategy articles, sample code, tips, Oracle and partner news, how to articles for developers and DBAs, and more. Oracle (NASDAQ: ORCL) is the world's largest enterprise software company.
subscribe

Total Telecom Total Telecom is "The Economist of the communications industry".
subscribe