dsailors has asked for the wisdom of the Perl Monks concerning the following question:

Is there a way to call a CGI script (perl) from JavaScript and return data or perhaps return a return code back to the involking Java Script and allow that JavaScript to interogate the return code or returned Data and perform functions based on what is returned?
  • Comment on CGI from Java Script with return to that Java Script

Replies are listed 'Best First'.
Re: CGI from Java Script with return to that Java Script
by betterworld (Curate) on Apr 24, 2007 at 00:19 UTC

    I think Ajax is what you need. See here for a simple example, or CGI::Ajax for a Perl module.

Re: CGI from Java Script with return to that Java Script
by rhesa (Vicar) on Apr 24, 2007 at 00:17 UTC
    Yeah, it's called Ajax these days.