I have this front end javascript that calls my perl like this when I click a link:
cgi-bin/rpt.pl?dataname=ASRHOUR
The problem is, the very first thing I do in the perl is check which parameter for dataname is sent, but it isn't populating!
Here is the beginning:
use strict;
use File::Glob ':glob';
use DBI;
use JSON;
use POSIX qw(strftime);
use POSIX ":sys_wait_h";
use warnings;
use CGI;
use CGI::Carp qw/fatalsToBrowser/;
use Data::Dumper;
my $query = CGI->new;
my $reportname = $query->param('dataname');
print $query->header;
print Dumper $query;
And nothing is pushed into $reportname. It's blank. If I execute the script directly, and not thru the button click, it reports data fine.
The kicker is, I have the newest Firebug in firefox installed, so it's SHOWING me the correct parameter name. If I hard code $reportname, it works great.
So basically I execute
http://localhost/cgi-bin/rpt.pl?dataname=ASRHOUR
It's fine
I see in firebug this being executed through the GUI:
http://localhost/cgi-bin/rpt.pl?dataname=ASRHOUR
And nothing happens.
So I am under the impression I am not catching the parameter correctly. Also, under the params section in the Firebug, it shows the correct parameter name & value. Please help, I been staring at this all day.