leighsharpe has asked for the wisdom of the Perl Monks concerning the following question:
Now, the SomeJavascriptfunction() is designed to make sure that only one of these radio buttons is selected. It makes no sense to me why they didn't just use the same value for each radio button, ensuring that the browser did that for them, but I have no control over the site. So, my question is, how can I uncheck button1 with mech, if I want to check button3? I can't see a 'clear' function anywhere in WWW::Mechanize anywhere. Checking button3 is as easy as<input type='radio' name='button1' value='button1' onClick='SomeJavasc +riptfunction()' checked> <input type='radio' name='button2' value='button2' onClick='SomeJavasc +riptfunction()'> <input type='radio' name='button3' value='button3' onClick='SomeJavasc +riptfunction()'>
But that leaves button1 checked.$mech->fields('button3'=>'button3');
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: WWW::Mechanize and clearing radio buttons
by james2vegas (Chaplain) on Aug 24, 2009 at 00:00 UTC |