Hi all,

I managed to get the problem with my script not connecting to the page last 
night, turned out my web host wouldn't allow it.  Got that sorted.  Filling in 
the form should be really simple but I'm getting the following error when 
trying to set the "acOriginAirport" field, I thought it might be to do with the 
javascript on the page but I'm entering a value that the form accepts.

The form is being found on the page as I can dump out $agent->forms();

Any ideas anyone?

Status: 500
Content-type: text/html

Software error:
Can't call method "value" on an undefined value at 
/usr/local/lib/perl5/site_perl/5.8.8/WWW/Mechanize.pm line 1407.


This is my script:
#!/usr/bin/perl -w

use strict;
use CGI qw(:standard);
use CGI::Carp qw(warningsToBrowser fatalsToBrowser);    
use WWW::Mechanize;
use HTML::TokeParser;
use Data::Dumper;
print "Content-type: text/html\n\n";
print "setting up mech<br />";
my $agent = WWW::Mechanize->new();
   $agent->agent_alias('Windows Mozilla');
print "mech setup";
   
$agent->get('http://www.easyjet.com/en/searchpod.mvc/showborderless?aclwidth=279');
print "setting up airports <br />";
$agent->field("acOriginAirport", "Glasgow GLA");




Cheers in advance,

G :)
                                          

Reply via email to