Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?

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?

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

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (2)
As of 2023-06-05 14:39 GMT
Find Nodes?
    Voting Booth?
    How often do you go to conferences?

    Results (25 votes). Check out past polls.