This website of mine does the following steps: You can try the webapp just by using the default values (by just pressing SUBMIT button, nothing else).

Now what I am trying to achieve here is that: once the "RUN SPACE Button" is pressed, it should bring the user to this Main website with the output result paste into the FASTA text field.

The current system I had only bring us to the cgi script of my main website, without the decoration, etc. How can I make it appear in the Main website with the content pasted into it with CGI.pm?

Below is the portion of the code that fails to do the job. And the full code can be found here.
sub print_results { # Snipp---- # Accept job with specified parameter my $param = "perl search_gname_and_fasta.pl -gti $go_ti -s $org_ty +pes -o $outfile -du $seq_type -f $wstr -t $wend"; #print "$param\n"; print br; print "Please wait, this may take a few seconds.\n"; print br; print hr; system($param); print br; print "Thank you for submitting the job with us.\n"; print br; my $fasta = read_file($outfile); prn_run_space_button(param('organism'),$fasta); # I don't know how to achieve the above function # with CGI.pm #print start_multipart_form(), #print start_form(-method=>"POST", # -action=>"space_dispatch.cgi", # ); #hidden( -name=>"analysis", -value=>"Light"); #hidden( -name=>"organism", -value=>"S.cerevisiae"); #hidden( -name=>"sequence", -value=>$fasta); #submit( -name=>'action', -value => 'Run SPACE-1' ), #print endform; } sub prn_run_space_button { my ($orgname,$fname) = @_; # This snippet only brings us to the cgi # but not the Main website in its entirety # At this point I tried verbatim print the # htmls decoration according to main file. # But won't do. print qq(<FORM METHOD="POST" ACTION="space_dispatch.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 SPACE">\n); print qq(</FORM>\n); return ; }

Regards,
Edward

In reply to How to pass value/output of a CGI script to another CGI in its website entirety by monkfan

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.