Beefy Boxes and Bandwidth Generously Provided by pair Networks
Come for the quick hacks, stay for the epiphanies.
 
PerlMonks  

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

by wind (Priest)
on Apr 03, 2011 at 02:53 UTC ( #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? | Other CB clients
Other Users?
Others browsing the Monastery: (5)
As of 2023-09-21 07:54 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?