Author Topic: POST data to a form, not linuxmce related  (Read 2037 times)

klanmce

  • Veteran
  • ***
  • Posts: 133
    • View Profile
POST data to a form, not linuxmce related
« on: September 15, 2011, 11:38:09 pm »
My grabber stopped working as the site layout changed.

I am using the LWP::UserAgent in perl, to get the web sites. There is a post function in it, that allows you to send data to a field in a form, I am not getting it to work, presently using

Quote
my $r = $ua->post( $url, \%form, 'ucChannelDetail1$drpDays' => $dayToGrab);

Have also tried

Quote
my $r = $ua->post( $url, \%form, name => $dayToGrab);

This is based on the page source code, part in question below

Quote
<select name="ucChannelDetail1$drpDays" onchange="javascript:setTimeout('__doPostBack(\'ucChannelDetail1$drpDays\',\'\')', 0)" id="ucChannelDetail1_drpDays">
      <option selected="selected" value="15/09/2011" day="15" month="9" year="2011">Today</option>
      <option value="16/09/2011" day="16" month="9" year="2011">Tomorrow</option>
      <option value="17/09/2011" day="17" month="9" year="2011">17/09/2011</option>
      <option value="18/09/2011" day="18" month="9" year="2011">18/09/2011</option>
      <option value="19/09/2011" day="19" month="9" year="2011">19/09/2011</option>

      <option value="20/09/2011" day="20" month="9" year="2011">20/09/2011</option>
      <option value="21/09/2011" day="21" month="9" year="2011">21/09/2011</option>

   </select>


Just wondering if anyone can provide any pointers.

Thanks