Hi All,
I have looked various thread on the same topic, but my questions is not answered in any of them. My requirement is I want to populate the drop B based on drop A. I read manual and I am using the userscirpt example, I have only two items in my DCT and when I want to call the perl program I want to pass three values, drop A select item, drop down B value and also the how many items are selected for drop A. I am setting the value as shown below, but for some reason the perl program is not getting the value. Your help is appreciated.
DCT :
function fetchLocations(item, defaultCity) {
var params = new Object();
var myOptions = item.getOptions();
var myValues = item.getValue();
var len = myValues.length;
var regionArr = new Array();
var i=0;
len--;
for(i=0;i<=len;i++) {
regionArr
= myOptions[myValues].value;
}
var lenValue = regionArr.length;
params.region = myOptions[parseInt(item.getValue())].value;
params.defaultCity = defaultCity;
params.len= lenValue;
alert (params.region);
alert (params.len);
//alert the user that an external call is being made.
IWDatacapture.displayMessage("Retrieving locations in " +
myOptions[parseInt(item.getValue())].text + "...");
top.hiddenFrameRunning = true;
var server = window.location.hostname;
IWDatacapture.callServer("http://"+server+"/iw-bin/getLocations.ipl",
params);
}
and in getLocation.ipl,
use CGI;
#Turn buffering off.
$| = 1;
my $in = new CGI;
@name = $in->param;
my $region = $in->param('region');
my $city = $in->param('defaultCity');
my $tmp_length = $in->param('len');
I am getting blank space for length. Please help me.
Thanks!