Hi again, I think I might drive people nuts with all my questions, but This is all new to me. I am using the following web page:
The portion I'm working with: <form action='http://TestMachine/SomeForm.asp'method="post" id="MetaFo +rm" name="MetaForm" Enctype="multipart/form-data" target="hidMFLIFram +e"> <div class="FormContent"> <div id="FormHeader"></div> <div id="TabsSection" onclick="SelectTab()" class="TabRow"></d +iv> <div id="FormPage" class="FormSection"></div> <div id="PreviewSection"></div> <div id="EndSection"></div> <div id="buttonTable"><p><table align="center" cellspacing="15 +"> <tr> <DIV ID="uploadanim" STYLE="position: relative; visibi +lity: hidden;"><IMG src='http://TestMachine/Images/Upload.gif></DIV> <td><input id="btnPreviousTab" name="btnPreviousTab" o +nclick="PreviousTab()" type="button" value="Previous" disabled="true" +/></td> <td><input id="btnNextTab" name="btnNextTab" onclick=" +NextTab()" value="Next" type="button" /></td> <td><input id="btnPreview" name="btnPreview" onclick=" +ShowPreview()" type="button" value="Preview" disabled="true" /></td> <td><input id="btnSubmit" name="btnSubmit" type="butto +n" value="Submit" disabled="true" onclick="return submitMetaForm()"/> +</td> + <td><input id="btnCalculate" name="btnCalculate" type= +"button" onclick="Calculate()" value="Calculate" /></td> + </tr></table> </p></div> </div> <input type="hidden" id="guid" name="guid"/> <input type="hidden" id="pagename" name="pagename"/> <input type="hidden" id="hidmfltempfolder" name="hidmfltempfol +der"/> </form>
I physically have to click 'next' 6 times, and then I click 'submit'. There are 6 pages in the form I have to traverse before I have the option to submit the form. I'm using the follwoing code:
use LWP::UserAgent; $ua = LWP::UserAgent->new; for (1 .. 6 ) { my $req = HTTP::Request->new(POST => 'http://TestMachine/SomeForm.asp +'); $req->content_type('application/x-www-form-urlencoded'); $req->content('onclick="NextTab()"'); } my $req = HTTP::Request->new(POST => 'http://TestMachine/SomeForm.asp +'); $req->content_type('application/x-www-form-urlencoded'); $req->content('onclick="return submitMetaForm()"'); my $res = $ua->request($req); print $res->as_string;
This just seems to cycle and never actually advance. Am I doing something wrong, and or is there a way I can check the results instead of printing out the page's content? Thank you again

In reply to Multiple times by Anonymous Monk

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.