in reply to Re^2: retrieving value from ajax call to cgi page
in thread retrieving value from ajax call to cgi page
Okay, let's assume that your javascript does indeed work, and that the problem lies with your script.
In that case, we will need a more complete example of your code. Is the $cgi object in the current scope? Did you turn on strict and warnings?
For now, try the following sample:
#!/usr/bin/perl use strict; use warnings; use CGI::Carp qw(fatalsToBrowser); # not needed per se, but very usefu +l for debugging use CGI; my $cgi = new CGI(); print $cgi->header("text/javascript"); print "alert('", $cgi->param("value1") || "nothing", "');\n";
~Thomas~
"Excuse me for butting in, but I'm interrupt-driven..."
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^4: retrieving value from ajax call to cgi page
by gayu_justin (Novice) on Jun 30, 2013 at 04:05 UTC | |
by Anonymous Monk on Jun 30, 2013 at 15:52 UTC | |
by gayu_justin (Novice) on Jul 02, 2013 at 08:01 UTC |