Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

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 the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (4)
As of 2015-11-29 08:13 GMT
Find Nodes?
    Voting Booth?

    What would be the most significant thing to happen if a rope (or wire) tied the Earth and the Moon together?

    Results (749 votes), past polls