Beefy Boxes and Bandwidth Generously Provided by pair Networks
"be consistent"
 
PerlMonks  

Re: How do I uncheck a checkbox with WWW::Mech?

by wind (Priest)
on Apr 03, 2011 at 02:53 UTC ( [id://897146]=note: print w/replies, xml ) Need Help??


in reply to How do I uncheck a checkbox with WWW::Mech?

The documentation for WWW::Mechanize says tick and untick accept the following parameters:

$mech->tick( $name, $value [, $set] )

$mech->untick( $name, $value )

I therefore suspect that what you really need to do is the following:

$self->{'agent'}->untick('newsletters', 17); $self->{'agent'}->untick('newsletters', 65); $self->{'agent'}->untick('newsletters', 34); $self->{'agent'}->untick('newsletters', 71);
Or more succiently
$self->{'agent'}->untick('newsletters', $_) for (17, 65, 34, 71);

However, not knowing the form or the html that you're accessing, I can't say for sure what you're doing incorrectly. Can only go on the way it looks.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://897146]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (5)
As of 2024-03-28 15:22 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found