Find the answer to your Linux question:
Results 1 to 5 of 5
Hi, one application I have to develop is to use cgi scripts in a web page. I've found shell script as examples of cgi scripts. But I have also find ...
  1. #1
    Just Joined!
    Join Date
    Oct 2009
    Posts
    2

    is a java script a cgi script?

    Hi,

    one application I have to develop is to use cgi scripts in a web page. I've found shell script as examples of cgi scripts. But I have also find javascript integrated in html files.

    So my question is "are javascript considered as cgi scripts or is it really different?"

    thanks for reply and sorry for my unknowledge but I am a newbie in all this html stuff...

    Pierre LABEGUERIE ESECO SYSTEMS.fr Web3.0 and Web4.0 appliances for videosurveillance, security and risk protection ESECO SYSTEMS

  2. #2
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    JavaScript is executed by the browser, on the client computer that is.
    CGI is an interface which calls applications for execution on the server.

    So they are not similar. Both methods work independently but can also be employed complementary.
    Debian GNU/Linux -- You know you want it.

  3. #3
    Just Joined!
    Join Date
    Oct 2009
    Posts
    2
    So is this kind of linked scripts possibles?:

    one html file like this one:

    <SCRIPT LANGUAGE = "JavaScript">
    function bouton()
    {
    alert("you've just clic")
    }
    </SCRIPT>
    <HTML>
    <HEAD>
    <TITLE> TEST </TITLE>
    </HEAD>
    <BODY>
    <form method="GET" action="../usrcgi/hello.cgi" >
    </form>
    <h1> TEST </h1>
    <INPUT type="button" value="clic" onClick="javascript:bouton()">
    </BODY>
    </HTML>


    the (bonjour) cgi file being something like this:

    #!/bin/sh

    echo "Content-Type: text/plain"
    echo "hello"



    Pierre LABEGUERIE ESECO SYSTEMS.fr Web3.0 and Web4.0 appliances for videosurveillance, security and risk protection

  4. #4
    Linux Engineer GNU-Fan's Avatar
    Join Date
    Mar 2008
    Posts
    935
    Yes, it is.
    Debian GNU/Linux -- You know you want it.

  5. #5
    Linux Guru Rubberman's Avatar
    Join Date
    Apr 2009
    Location
    I can be found either 40 miles west of Chicago, or in a galaxy far, far away.
    Posts
    8,974
    Any programming language that can be executed directly and that obeys the rules for argument lists for CGI can be used for CGI. IE, most any shell or scripting language (perl, python, bash, etc) or compiled program (C, C++, Java, etc) can be used for CGI interfaces from your web server.
    Sometimes, real fast is almost as good as real time.
    Just remember, Semper Gumbi - always be flexible!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
...