develooper Front page | perl.libwww | Postings from August 2001

Http post problem with forms having javascript before submit

From:
qwerty qwerty
Date:
August 4, 2001 14:43
Subject:
Http post problem with forms having javascript before submit
Message ID:
F200Lch9wPiyAphwFut00000adb@hotmail.com
Hi,
Has anyone had problem posting a form which calls a javascript before 
submit.
I got an old post from Sean Bruke Where he mentions to figure out what java 
script is doing and change the post name value pairs accordingly.  I did 
that but is still gives the problem.

Here is the code:
The site returns a wave file if succeeds, but now it is retruning java 
sctipt not enabled.

any help is appreciated
*********
use LWP;
$url='http://www.naturalvoices.att.com/cgi-bin/ttsdemo-act';
my $browser = LWP::UserAgent->new();
use HTTP::Request::Common;
my $request = POST($url,
[ InputText => 'This is a Test',
      VoiceOut =>'male',
      OutFormat => 'wav',
      SampleRateOut =>'22050'] );
my $response = $browser->request($request);
if ($response->is_success) {
            print $response->content;
            #my $wavfile = $response->content;
            #open(WAVE_FILE,"> outputfile.wav")  || print"Error :  Can't 
open outputfile: $!";
            #print WAVE_FILE $wavfile;
            # close(WAVE_FILE);
      } else {
            print $response->as_string;
      }
******************************************





_________________________________________________________________
Get your FREE download of MSN Explorer at http://explorer.msn.com/intl.asp




nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About