Why can't I get back the same full page as I do in firefox after a post?<br><br>I am trying to post data to <a href="https://www.sss.gov/RegVer/wfVerification.aspx">https://www.sss.gov/RegVer/wfVerification.aspx</a><br>
It is accepting the post, for both a valid record and a not found record, but the html code<br>I am getting back in mechanize is not complete as the code I am getting back in firefox view source.<br><br>In firefox the page works without javascript.<br>
<br>I read through the forum and tried google, but could not find answer.<br><br>Any help would be greatly appreciated.<br><br>Best Regards- Charles<br><br><br><br><br>pastie version of the same here<br><a href="http://pastie.caboo.se/private/0qsxcjzwunvijds0quuonq">http://pastie.caboo.se/private/0qsxcjzwunvijds0quuonq</a><br>
<br>require 'rubygems'<br>require 'mechanize'<br>agent = WWW::Mechanize.new<br>agent.user_agent_alias = 'Mac FireFox'<br>agent.redirect_ok = true<br><br>page = agent.get('<a href="https://www.sss.gov/RegVer/wfVerification.aspx'">https://www.sss.gov/RegVer/wfVerification.aspx'</a>)<br>
sss_form = page.form('aspnetForm')<br>sss_form.[]=("_ctl0:ContentPlaceHolder1:tbSSAN", 555555999) <br>sss_form.[]=("_ctl0:ContentPlaceHolder1:tbLastName", "Harvey")<br>sss_form.[]=("_ctl0:ContentPlaceHolder1:tbDOB", "03251966")<br>
page = agent.submit(sss_form, sss_form.buttons[1])<br><br>###{#################################################################}#<br><br>If I do it with my real data I get a line in the returned code that says it was a success<br>
>> sss_form.[]=("_ctl0:ContentPlaceHolder1:tbSSAN", 510999999) <br> => 510565972<br> >> sss_form.[]=("_ctl0:ContentPlaceHolder1:tbLastName", "Smith")<br> => "Harvey"<br>
>> sss_form.[]=("_ctl0:ContentPlaceHolder1:tbDOB", "02021966")<br> => "02051966"<br> >> page = agent.submit(sss_form, sss_form.buttons[1])<br> => #<WWW::Mechanize::Page<br>
{url<br> #<URI::HTTPS:0x90d292 URL:<a href="https://www.sss.gov/RegVer/wfVerification.aspx">https://www.sss.gov/RegVer/wfVerification.aspx</a>>}<br> {meta}<br> {title "\r\n\tSelective Service System: Verification Receipt\r\n"}<br>
{iframes}<br>########################################## <br>If I submit it with a fake name and SS# I get a field as accepting the post but returning as expected a no record found message.<br><br> >> page = agent.submit(sss_form, sss_form.buttons[1])<br>
=> #<WWW::Mechanize::Page<br> {url<br> #<URI::HTTPS:0x909944 URL:<a href="https://www.sss.gov/RegVer/wfError.aspx?Message=NotFound_V&src=VER">https://www.sss.gov/RegVer/wfError.aspx?Message=NotFound_V&src=VER</a>>}<br>
{meta}<br> {title "\r\n\tSelective Service System: Registration Error\r\n"}<br><br><br>But with either one I do not get back the same information in my firefox browser source namely:<br> <br> ******* From page source in firefox on a successful post - edited **********<br>
<font face="Arial" size="2"><b>Last Name:</b><br> <span id="_ctl0_ContentPlaceHolder1_lblLastName" class="registrationcopy_light" style="font-style:italic;">Harvey</span></font><br>
<br /><br> <font face="Arial" size="2"><b>Social Security Number:</b> <br> <span id="_ctl0_ContentPlaceHolder1_lblSSAN" class="registrationcopy_light" style="font-style:italic;">*** - ** - 5999</span></font><br>
<br /><br> <font face="Arial" size="2"><b>Date of Birth:</b><br> <span id="_ctl0_ContentPlaceHolder1_lblDOB" class="registrationcopy_light" style="font-style:italic;">03/25/1966</span></font><br>
<br /><br><br> <font face="Arial" size="2"><b>Selective Service Number:</b><br /><br> <span id="_ctl0_ContentPlaceHolder1_lblSSN" style="font-style:normal;">66-0175555-2</span><br /><br>
<br> <font face="Arial" size="2"><b>Date of Registration<br /><br> </b><br> <span id="_ctl0_ContentPlaceHolder1_lblAccessionDate" style="font-style:normal;">4/9/1984</span></font></p><br>
*********************************************************************************************************<br><br><br><br><br><br> ******* From page source in firefox on a post that does not have a valid record- edited **********<br>
<br> <font face="Arial" size="2"><br><br> <span id="_ctl0_ContentPlaceHolder1_lblErrorTitle" class="validation2">Sorry. </span><br> <br /><br> <span id="_ctl0_ContentPlaceHolder1_lblErrorDetail" class="registrationcopy_light">Based on the information you submitted (information listed below), a registration record cannot be found for this individual.</span><br>
<span id="_ctl0_ContentPlaceHolder1_lblErrorDetail2" class="registrationcopy_light"><br><br>If you made a mistake when entering data, please try a </span><br> <span id="_ctl0_ContentPlaceHolder1_lblErrorDetail3" class="registrationcopy_light"></span><br>
<a id="_ctl0_ContentPlaceHolder1_lnkError1" class="registrationcopy_light" href="wfVerification.aspx">New Search</a><br> <span id="_ctl0_ContentPlaceHolder1_lblErrorDetail4" class="registrationcopy_light"></span><br>
<br> <a id="_ctl0_ContentPlaceHolder1_lnkError2" class="registrationcopy_light"></a><br> <span id="_ctl0_ContentPlaceHolder1_lblErrorDetail5" class="registrationcopy_light">. If you entered the data correctly, there are several reasons why the registration may not be verifiable at this time. Please dial 1-847-688-3117 for further information.</span><br>
<span id="_ctl0_ContentPlaceHolder1_lblTimeStamp" class="timestamp">(2/29/2008 11:09:16 AM)</span><em></em></font></td><br><br> <span id="_ctl0_ContentPlaceHolder1_lblLastName" class="registrationcopy"><br><br>Last Name: </span><br>
<br> <span id="_ctl0_ContentPlaceHolder1_lblLastName2" class="registrationcopy_light">Smith<br></span><br /><br> <span id="_ctl0_ContentPlaceHolder1_lblSSAN" class="registrationcopy">Social Security Number: </span><br>
<span id="_ctl0_ContentPlaceHolder1_lblSSAN2" class="registrationcopy_light">*** - ** - 5999<br></span><br> <span id="_ctl0_ContentPlaceHolder1_lblSSN3" class="registrationcopy"></span><br>
<span id="_ctl0_ContentPlaceHolder1_lblSSN4" class="registrationcopy_light"></span><br /><br> <span id="_ctl0_ContentPlaceHolder1_lblDOB" class="registrationcopy">Date of Birth: </span><br>
<span id="_ctl0_ContentPlaceHolder1_lblDOB2" class="registrationcopy_light">03/25/1966<br></span><br /><br><br> <span id="_ctl0_ContentPlaceHolder1_lblErrorDetail6" class="registrationcopy_light"></span><br>
<a id="_ctl0_ContentPlaceHolder1_lnkError3" class="registrationcopy_light"></a>&nbsp;<br> <br> <br><br><br>
pastie version of the same here<br>
<a href="http://pastie.caboo.se/private/0qsxcjzwunvijds0quuonq">http://pastie.caboo.se/private/0qsxcjzwunvijds0quuonq</a><br> <br> <br>