Mathew Snyder wrote:
I have a form I'm trying to fill out.  One of the fields, despite being named
in the HTML source keeps erroring out on me.

The HTML source:
<td>
<select name="ValueOfActor">
<option SELECTED value="">-</option>
<option value="Nobody">Nobody</option>
...

The perl code:
...
$agent->submit_form(
        form_number => '3',
        fields => {
                "ValueOfStatus" => $status,
                "Value0fActor" => $username,
        },
        button => 'DoSearch'
);
...

The error:
No such field 'Value0fActor' at
/usr/lib/perl5/vendor_perl/5.8.8/WWW/Mechanize.pm line 1233

How can there not be a field by that name if the HTML source tells me there
is?
 Any help would be appreciated.


Hi Mathew

My first thought is that perhaps your form_number is wrong? Why not try
replacing the fields parameter with a with_fields one, when Mechanize will find
the first form with the fields you specify (you'll get a warning if there's more
than one) and ignore your form_number.

HTH,

Rob


--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
<http://learn.perl.org/> <http://learn.perl.org/first-response>


Reply via email to