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.
In reply to Re: (OT) how to call cgi script from javascript?
by Corion
in thread (OT) how to call cgi script from javascript?
by aurora26
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |