Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
FormAPi to Perl once more
Renata
hi all,
I'm trying to pass a variable from From API to perl ... but I can't get it to work ... I've tried a number of things and am out of any more ideas for this ... I'm kindda new to cgi ... your help is much appreciated
my JS looks like this:
function loadData(){
var parameters = new Object();
parameters.test = "ssssssssssss";
var server = window.location.hostname;
var url = "http://"+server+"/iw-bin/iw_cgi_wrapper.cgi/test.ipl";
IWDatacapture.callServer(url, parameters,true);
return true;
}
and my perl looks like this:
my $cgi = TeamSite::CGI_lite->new();
$cgi->parse_data();
my $in = new CGI;
I have tried all of the following:
my $tt = $in->param('parameters');
my $tt = $cgi->{'form'}{'parameters'};
my $tt = $cgi->{'parameters'}{'test'};
I have tried a few others but with no luck ... could someone please point out what I'm doing wrong ...
I have checked my %ENV, the QUERY_STRING value is set to test=test ... which looks a bit suspicious to me as this was a value I tried yesterday, it's not getting reset, should it always have this value? what is this $ENV{QUERY_STRING} for ?
thanks a bunch -- ro
Find more posts tagged with
Comments
LooseCannon
This should work:
my $tt = $in->param('test');
Renata
thanks a lot it worked indeed...
I have also been able to extract my values from %ENV{QUERY_STRING} after rebooting the server ... but your way is much simpler ... thanks again
can you tell me what difference there is between the two ways of calling parameters, cgi and cgi_light ...
thanks in advance