Hello,
I know how to use checkbox and buttons. But choosing a radio button from a form is difficult for me.
How can i choose 2nd radio button from my above code?
Checkbox selection i used code like this ..
$agent->tick('checkboxname', 'value');
and submitting the form, code as
$agent->click('FrmButton');
So how can i select a radio button? Pls post a code for this?
portion of my html code is given below
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td width="50%"> <input type="radio" value="USAGE CREDIT" na
+me="CreditType" checked> Usage Credit</td> </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td width="50%"> <input type="radio" value="ACCT CREDIT" nam
+e="CreditType"> Account Credit</font></td></tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td width="50%"> <input type="radio" value="PAYMENT" name="
+CreditType" > Payment</td><td width="50%"></td> </tr>
</table>
<table border="0" width="100%" cellspacing="0" cellpadding="0">
<tr><td width="50%"> <input type="button" value="Submit" name="
+Frmbutton" ></td> </tr>
</table>
Thanks in advance
20030718 Edit by Corion: Changed bold to code
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.