56 users online (1 members and 55 guests)  


  Results 1 to 4 of 4

Related

  1. Win $50 USD by Posting    Forum: Internet Services
    Replies: 0
  2. Read before posting.    Forum: Announcements
    Replies: 0
  3. think i'm posting?    Forum: General Discussion
    Replies: 3
  1. #1
    sujith's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2006
    Posts
    7

    with out posting


    I want to assingn a java sript variable
    to a perl variable
    can i do this with out posting my
    form
    plese help me

  2. #2
    netroact's Avatar
    New User

    Status
    Offline
    Join Date
    Feb 2006
    Posts
    19

    Re: with out posting

    Yes, but we need more info. Are you using both variables in a single script, or is the javascript value coming from a javascript form? Not sure what you are asking.

  3. #3
    sujith's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2006
    Posts
    7

    Re: with out posting

    i am using both in same file

  4. #4
    sujith's Avatar
    New User

    Status
    Offline
    Join Date
    Jun 2006
    Posts
    7

    Re: with out posting

    Quote Originally Posted by netroact
    Yes, but we need more info. Are you using both variables in a single script, or is the javascript value coming from a javascript form? Not sure what you are asking.
    Yes i am using both in a single script

    code:
    #!C:/usr/bin/perl
    require "cgi-lib.pl";
    print"Content-type:text/html\n\n";
    print<<END

    <SCRIPT language=javascript type=text/javascript>
    function changeTest ()
    {
    var javaVar=document.menuForm.select1.options[document.menuForm.select1.selectedIndex].id;
    return test;
    }
    </SCRIPT>
    <body>

    <form action="../action/return.html" method="post" id="menuForm" name="menuForm" >
    <select id="select1" onChange="changeTest()" name="select1">
    <option selected="selected">Choose a color</option>
    <option id="1">CSS</option>
    <option id="2">Shamrock</option>
    <option id="3" >Pink Star</option>
    </select>
    </form>

    END
    ;
    #/* i want to assingn the java script variable to perl variable BUT nothing happens*/
    $perlVar=javaVar;
    print<<END
    <h1>$perlVar</h1>
    <h2>javaVar</h2>

    </BODY></HTML>
    END

    ;



    I think some one can help me



Tags for this Thread