in reply to mechanize accessing a listbox

I'm no expert, but based on the docs, it looks like you want something more like this:
$mech->submit_form( form_number => 1, fields => { old => 'Evaluation-Folder/Evaluation-Sub-Folder-1' +, }, button => 'Delete' );

It appears to be telling you there's no select called old to be found...

EDIT: I tried WWW::Mechanize on one of my own sites that I'm developing and all I can say is: thanks dude. This module rocks and I had never heard of it... Just wow. (Also, my code above appears to work as written.)

Replies are listed 'Best First'.
more on mechanize accessing a listbox
by thelma1944 (Novice) on Dec 14, 2006 at 00:10 UTC
    Thanks for the hint. Big help! While trying the above i get an error of: Can't call method "value" on an undefined value at /Library/Perl/5.8.6/WWW/Mechanize.pm line 1137. Any ideas what this may be? Looking at the Mechanize.pm code: my $form = $self->{form}; if ($number > 1) { $form->find_input($name, undef, $number)->value($value); } else { if ( ref($value) eq 'ARRAY' ) { $form->param($name, $value); } else { $form->value($name => $value); } } } Respecfully yours, Thelma Vance, thelma1944@netzero.com
      [editorial note: please use the <code> tags...]

      ...looks like Mechanize is calling value() on an undefined value. At a guess, you apparently didn't get the site: $mech->get($url). You have to get() before you can start interacting with it.

      -Paul