Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:
... $("#send").click(function(){ $.ajax({ type: 'POST', url: 'process.pl?first=<TMPL_VAR NAME="FR">&last=<TMPL_VAR NA +ME="LA">', dataType: "json", success: function(data) { if(data){ alert("We pass!"); } }, error: function() { alert("We have a problem!"); } }); }); ...
#!/usr/bin/perl use strict; use warnings; use CGI; my $q = new CGI; my $first = $q->param("first"); my $last = $q->param("last"); print "F=$first - L=$last\n"; exit;
... url: 'process.pl?<TMPL_VAR NAME="FR"> <TMPL_VAR NAME="LA">', ...
... my ($first, $last ) = @ARGV; print "F=$first - L=$last\n"; ...
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Passing values from an AJAX call to non-CGI Perl script
by haukex (Archbishop) on Dec 10, 2018 at 19:18 UTC | |
|
Re: Passing values from an AJAX call to non-CGI Perl script
by NetWallah (Canon) on Dec 10, 2018 at 17:13 UTC |