Hi, Hmmmm almost I am working for this for the last 3 days. But could not able to solve the issue. Actually I am using perl mechanize module for some authenticated form submission. I was able to login and I was able to do a lot. At final stage when I was submiting one form Is is unable to post few default values because they are filled by javascript when the page loads. So I searched for mechanize with javascript which was not working and finally what I did is I am able to parse the option names and values by reading the html code.

Html code that will generated once the javascript executes
--------------------------------------------------------
<select id="samba" ondblclick="javascript:ddddd('rwww');"
size="20" multiple="" name="samba">
<option value="172">X</option>
<option value="45">Y</option>
<option value="39">Z</option>
<option value="56">M</option>
</select>

At this point of time I am able to post only one value like this.
$mech->submit_form(
form_number => 1,
fields => {
loginid => 'testid8',
password => 'testid8',
repassword => 'testid8',
name => 'Testing',
email => samba@gmail.com',
samba => '45',
},
);

But when my question is how can I pass multiple values. Tried in different ways but no luck. I could not able to use $mech->select as the above code will be generated after the java script excutes which is not happening in mechanize. Plese help me....

In reply to Please help me in mechanize module by samba123456

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • 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:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.