passing js var to perl parma()

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

  1. rwcherry

    rwcherry

    Joined:
    Aug 2, 2013
    Messages:
    2
    #!/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. Advertising

  2. rwcherry

    MsMillie55

    Joined:
    Nov 2, 2013
    Messages:
    1
    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. Advertising

  3. rwcherry

    Sowell11

    Joined:
    Dec 11, 2013
    Messages:
    1
    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. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. rgarvind

    Regarding perl programming. How 2 make HTTP request?

    rgarvind, Jan 10, 2005, in forum: Microsoft Certification
    Replies:
    1
    Views:
    728
  2. FreedomFireCom

    Looking For Cisco Var's

    FreedomFireCom, Nov 8, 2006, in forum: Cisco
    Replies:
    2
    Views:
    420
    FreedomFireCom
    Nov 17, 2006
  3. business one way

    Is it a Perl program or a Perl script?

    business one way, Jan 5, 2008, in forum: Digital Photography
    Replies:
    0
    Views:
    794
    business one way
    Jan 5, 2008
  4. Lodi

    /var/tmp in kubuntu

    Lodi, Oct 20, 2007, in forum: NZ Computing
    Replies:
    3
    Views:
    462
    Lawrence D'Oliveiro
    Oct 21, 2007
  5. rwcherry
    Replies:
    0
    Views:
    607
    rwcherry
    Aug 2, 2013
Loading...

Share This Page