Seeking your wisdom Monks,

I have to click a radio button(code is provided below). The problem is that the Radio buttons are having same "Value" :( and bcoz of that i am unable to do it in the conventional way. but the buttons are having a different "id". So my humble question is that how can make it to click. (I have an alternate way to go by getting the URL directly, but i need to do it in the $mech->field or set_visible way, as i have permission to do it in that way only.. Is there any chance for that..?

Thanks in advance Monks !

<label for="date">Date <input type="radio" class="radio" id="date" name="sort" value="Y" oncl +ick="change_search_format('/cgi-bin/advsearch?reord=D&amp;lr=&amp;rep +eat_search=Y&amp;agency_group_id=&amp;vac_group_id=&amp;agency_id=&am +p;vr=&amp;agency_group_id=&amp;agency_id=&amp;vr=');"></label> <label for="salary">Salary <input type="radio" class="radio" id="salary" name="sort" value="Y" on +click="change_search_format('/cgi-bin/advsearch?reord=S&amp;lr=&amp;r +epeat_search=Y&amp;agency_group_id=&amp;vac_group_id=&amp;agency_id=& +amp;vr=');"></label> <label for="relevance">Relevance <input type="radio" class="radio" id="relevance" name="sort" value="Y" + checked="checked" onclick="change_search_format('/cgi-bin/advsearch? +reord=R&amp;lr=&amp;repeat_search=Y&amp;agency_group_id=&amp;vac_grou +p_id=&amp;agency_id=&amp;vr=');"></label>

In reply to Click on Radio Button by www::Mechanize [All buttons have same "value" but different "id" and "Onclick" Value.] by Matt™

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.