passing js var to perl parma()

Discussion in 'Software' started by rwcherry, Aug 2, 2013.

  1. rwcherry

    rwcherry

    Joined:
    Aug 2, 2013
    Messages:
    2
    Likes Received:
    0
    #!/usr/bin/perl -w
    use CGI ':standard';
    print "Content-type: text/html\n\n";

    my $passp=100;

    print <<"pureHTML";

    <!DOCTYPE html>
    <HTML>
    <HEAD>
    <SCRIPT type="text/javascript" language="javascript">

    var passj=100;
    function passing(pp,pj) {
    window.location.assign(...passee.cgi?pssp='pp'&pssj='pj' );
    }
    passing($passp,passj);

    </SCRIPT>
    <title>passage</title>
    </HEAD>
    <BODY BGCOLOR="#fff" MARGINWIDTH="0" MARGINHEIGHT="0" TOPMARGIN="0" LEFTMARGIN="0">
    <p>&nbsp;&nbsp;</p>
    </BODY>
    </HTML>

    pureHTML

    1 ;

    This doesnt work, why not? Please!

    to look at results: passee.cgi
    #!/usr/bin/perl -w
    use CGI ':standard';
    print "Content-type: text/html\n\n";

    my $passp=param('pssp');
    my $passj=param('pssj');

    print 'passp=' . $passp;
    print ' passj=' . $passj \n;

    my $pp='$passp';
    my $pj='$passj';

    print ' pp=' . $pp;
    print ' pj=' . $pj;

    1;
     
    rwcherry, Aug 2, 2013
    #1
    1. Advertisements

  2. rwcherry

    MsMillie55

    Joined:
    Nov 2, 2013
    Messages:
    1
    Likes Received:
    0
    Really appreciate this post. It’s hard to sort the good from the bad sometimes, but I think you’ve nailed it!
     
    MsMillie55, Nov 2, 2013
    #2
    1. Advertisements

  3. rwcherry

    Sowell11

    Joined:
    Dec 11, 2013
    Messages:
    1
    Likes Received:
    0
    Eventually i am come here and want to say you that thanks for sharing your concept regarding the post. I am also feeling that this is one of the good posts.
     
    Sowell11, Dec 11, 2013
    #3
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.