Submitting 'name' in the textfield of a sign-in page opens (points 'action'to) a second frameset page. I want to pass the 'name' to one result_frame. What I have now at the top of the frameset page is:
#!/usr/bin/perl -w $ENV{'REQUEST_METHOD'} =~ tr/a-z/A-Z/;#Data coming in from my $buffer; read(STDIN, $buffer, $ENV{'CONTENT_LENGTH'}); use CGI qw/:standard/; use strict; use CGI::Carp qw(fatalsToBrowser); print header(); print "<html>"; print "<HEAD><SCRIPT LANGUAGE='JavaScript'>"; #<!-- print "var name = 'Testing'"; #$buffer print "</SCRIPT></HEAD>"; #//--> print "<FRAMESET ROWS='45%,55%'>"; print "<FRAMESET COLS = '75%,25%'>"; --------- print "</FRAMESET>"; print "</html>";
As it stands, via a js function to a button on another GO_frame of the same frameset, which assigns a textfield in the result_frame to 'parent.name', I can get 'Testing' to appear in the textfield (which I can later hide).
My problem now is to get the 'name' passed in $ENV{'REQUEST_METHOD'},i.e. $buffer into this parent variable. ($buffer needs yet some regexp to extract 'name',but for now I just want to see something of $buffer in the result_ frame textfield.)

Somewhere on the web I saw:
"If you want to assign the value to a JavaScript variable, you'd do something like (in PHP):

<SCRIPT type="text/javascript"> var counter = <?php echo $counter; ?>; </SCRIPT>
....which after evaluation (if counter was 10) should be: var counter = 10;"
WHAT'S THE EQUIVALENT OF THIS TRICK IN PERL?
Or, is there a better way to pass a variable from one page to a second frameset page such that it arrives to one particular frame of this frameset?

In reply to assigning a parent html (js) variable to a perl (cgi input) variable by lev

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.