|
Posted by Amer Neely on September 16, 2007, 10:35 am
Please log in for more thread options
Mumia W. wrote:
> On 09/15/2007 02:44 PM, Amer Neely wrote:
>> Apologies if I upset someone by posting this here. I had no response
>> in comp.lang.perl.misc.
>>
>> I'm trying to use this module to populate and submit a form on a
>> remote server, but *apparently* it is not doing either.
>>
>> -------------------------- 8< ---------------------------
>> #! /usr/bin/perl
>> use strict;
>> use warnings;
>>
>> use lib (
>> '/home/usr241/cgi-bin/PerlMods/WWW-Mechanize-1.18/lib',
>> '/home/usr241/cgi-bin/PerlMods/libwww-perl-5.808/lib',
>> '/home/usr241/cgi-bin/PerlMods/HTML-Parser-3.56/lib/'
>> );
>
> If you use the INSTALLSITELIB parameter when building the modules, you
> won't need to do this.
>
> perl Makefile.PL PREFIX=/path/to/modules INSTALLSITELIB=/path/to/modules
> INSTALLDIRS=site
Ah, thank you for that. I was already using PREFIX, but was unaware of
this one.
>
> (In your scripts just do this:)
>
> use lib '/path/to/modules';
>
>> use WWW::Mechanize;
>> use HTML::Form;
>>
>> my $mech = WWW::Mechanize->new();
>> my $url = "http://xxx.xxx.xxx./form.aspx"; # edited
>> [...]
>>
>>
>> Can anyone see anything wrong with this code that would cause it to
>> fail? The form I'm trying to populate and submit is a .aspx document.
>>
>
> No, I can't see what's wrong because I can't see the HTML that creates
> the form.
>
> Maybe the HTML has javascript to initialize some parts of the form, and
> the server rejects any forms that have not been so initialized.
>
The form I am trying to populate is made from an .aspx file, so I don't
really know what they are doing at their end. I'll suggest a different
approach to them. Thanks for responding.
--
Amer Neely
w: www.webmechanic.softouch.on.ca/
Perl | MySQL programming for all data entry forms.
"Others make web sites. We make web sites work!"
|