in reply to WWW::Mechanize & <option>s

That's an interesting question. Here's what I would do, but it may not be the most elegant solution.

I would load that page with Firefox, select the options that you want on the pulldowns, then select Page Info from the Tools menu. Click on the Forms tab and it should show you the names and current values of all form inputs. I would then build my WWW::Mechanize request using this information.

It's a bit roundabout and not Perlish in any way, but it should do the trick.

---
It's all fine and dandy until someone has to look at the code.

Replies are listed 'Best First'.
Re^2: WWW::Mechanize & <option>s
by FrankRizzo (Acolyte) on Mar 18, 2006 at 00:12 UTC
    Great idea! (And I would have no problem doing... If it worked) :-D Here's the pertinent code:
    $agent->submit_form( form_name => 'quickSearchForm', fields => { search => 'new', make => 'Subaru', model => 'B9 Tribeca', trim => '5-Passenger Ltd.', showImages => 'yes', fz => 'true', } );
    The field names, and values are exactly what show up in firefox, but it still gives me:
    Illegal value 'new' at C:/Perl/site/lib/WWW/Mechanize.pm line 1178