Wijaya Edward wrote:
Hi all,
I was resorting to this verbatim html print to do the task: print qq(<FORM METHOD="POST" ACTION="myscript.cgi">\n);
print qq(<INPUT type="hidden" NAME="analysis" VALUE="Light">\n);
print qq(<INPUT type="hidden" NAME="organism" VALUE=$orgname>\n);
print qq(<INPUT type="hidden" NAME="sequence" VALUE="$fname" >\n);
print qq(<INPUT type="submit" value="Run MySCRIPT">\n);
print qq(</FORM>\n);
I tried this with CGI.pm dialect, but doesn't seem to work:
print start_multipart_form(), print start_form(-method=>"POST",
                 -action=>"myscript.cgi",
             );
 hidden( -name=>"analysis", -value=>"Light");
 hidden( -name=>"organism", -value=>"S.cerevisiae");
 hidden( -name=>"sequence", -value=>$fasta);
submit( -name=>'action', -value => 'Run MySCRIPT'), print endform; Can anybody suggest how can it be done with CGI.pm?
The complete code can be found here: http://dpaste.com/9026/plain/


You aren't printing the tags for the fields. hidden() and submit() return
the text of the tag to be printed, and if you do nothing with this value it
will simply be discarded. Try this:

print
 start_multipart_form(-action => 'myscript.cgi'),
 hidden(-name => 'analysis', -value => 'Light'),
 hidden(-name => 'organism', -value => 'S.cerevisiae'),
 hidden(-name => 'sequence', -value => $fasta),
submit(-name => 'action', -value => 'Run MySCRIPT'), endform;

and you should get something close to what you want.

HTH,

Rob

--
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
http://learn.perl.org/


Reply via email to