I'm having issues parsing a page with a select multiple dropdown and need a nudge in the right direction.
I'm trying to select the names 'pforumClass', 'tforumClass' and 'uforumClass' with values '__all__' from the form prior to submitting it. HTML is below, followed by a code snippet:
<form method="POST" action="/forums/cs/dispatch.cgi/_admin/util_button
+Dispatch" onSubmit="return formSubmit()" name="CFO" >
<b>Public Forums:<br></b><select name="pforumClass" multiple size=8>
<option value="__none__" selected>-None-
<option value="__all__">--All--
--snip--
</select><p>
<b>Team Forums:<br></b><select name="tforumClass" multiple>
<option value="__none__" selected>-None-
<option value="__all__">--All--
</select><p>
<b>User Forums:<br></b><select name="uforumClass" multiple>
<option value="__none__" selected>-None-
<option value="__all__">--All--
</select><p>
<br>
<br>
Code snippet is as follows:
my $mech = WWW::Mechanize->new();
$mech->get("https://www.site.com/forums/cs/dispatch.cgi/_admin/diskUsa
+geForm");
$mech->form_name('CFO');
$mech->select('pforumClass','__all__');
$mech->select('tforumClass','__all__');
$mech->select('uforumClass','__all__');
$mech->click();
My LWP::Debug output informs me :
Illegal value '__all__' for field 'pforumClass' at C:/Perl/site/lib/WWW/Mechanize.pm line 1199
Illegal value '__all__' for field 'tforumClass' at C:/Perl/site/lib/WWW/Mechanize.pm line 1199
Illegal value '__all__' for field 'uforumClass' at C:/Perl/site/lib/WWW/Mechanize.pm line 1199
What am I missing? Gotta be something simple ...
Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
Read Where should I post X? if you're not absolutely sure you're posting in the right place.
Please read these before you post! —
Posts may use any of the Perl Monks Approved HTML tags:
- a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
| |
For: |
|
Use: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.