Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change

Re: (OT) how to call cgi script from javascript?

by Corion (Pope)
on Apr 16, 2012 at 08:04 UTC ( #965255=note: print w/replies, xml ) Need Help??

in reply to (OT) how to call cgi script from javascript?

CGI scripts respond to HTTP requests. How you submit that HTTP request does not matter, whether through Javascript or a plain HTML form.

If you want to "call a subroutine" (in your Perl code), you will have to send a HTTP request from Javascript to your CGI, and then dispatch that request to your subroutine in Perl. This is basically "RPC over HTTP", and any dispatch table in your CGI program can convert a string to a subroutine reference.

  • Comment on Re: (OT) how to call cgi script from javascript?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965255]
and all is quiet...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (5)
As of 2018-02-21 17:15 GMT
Find Nodes?
    Voting Booth?
    When it is dark outside I am happiest to see ...

    Results (285 votes). Check out past polls.