lev has asked for the wisdom of the Perl Monks concerning the following question:
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).#!/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>";
Somewhere on the web I saw:
"If you want to assign the value to a JavaScript
variable, you'd do something like (in PHP):
....which after evaluation (if counter was 10) should be: var counter = 10;"<SCRIPT type="text/javascript"> var counter = <?php echo $counter; ?>; </SCRIPT>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: assigning a parent html (js) variable to a perl (cgi input) variable
by Corion (Patriarch) on Sep 24, 2008 at 16:41 UTC | |
|
Re: assigning a parent html (js) variable to a perl (cgi input) variable
by jettero (Monsignor) on Sep 24, 2008 at 17:08 UTC |