Marseille07 has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am trying to click a checkbox that looks like the following:
<input id='CategoryId25' type='checkbox' name='CategoryId25' />
When I try:
$mech->tick("CategoryId25");
I get:
No checkbox "CategoryId25" for value "" in form at ./script_one.pl lin +e 34
Is there a workaround to click a checkbox without value?

Replies are listed 'Best First'.
Re: WWW::Mechanize, tick without value
by Khen1950fx (Canon) on Dec 30, 2009 at 07:40 UTC
    A workaround to click a ckeckbox without value:

    $mech->field( my_checkbox => 'on' );

      Or as per doc
      $mech->tick("CategoryId25",'on');
        Khen1950fx, Anonymous Monk:

        Thank you very much for your prompt replies, tested out both solutions and they both work brilliantly.