Beefy Boxes and Bandwidth Generously Provided by pair Networks
go ahead... be a heretic
 
PerlMonks  

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?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://965255]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-12-29 09:05 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (185 votes), past polls