I have some Form API code that does a callServer and passes it the DCR Last Modified Date, or at least I want it to. I'm finding that my CGI being called isn't getting the parameter when I try to grab it in the CGI. My log shows that it's printing a blank for the value passed in.
function getModDate() {
var moddate = IWDCRInfo.getModificationDate ();
alert("Mod Date is " + moddate);
var parameters = new Object();
parameters.lmd = moddate;
IWDatacapture.callServer("/iw-bin/ama/formatLastModDate.cgi", parameters, true);
}
function populateLastModDate(formattedDate) {
alert("Returning from Mod Date Call Server");
alert("Formatted Last Mod Date is\n\n" + formattedDate);
IWDatacapture.getItem("/object/Content/modDate").setValue('formattedDate');
}
I've also tried changing the line that sets the parameter to
parameter.lmd = IWDatacapture.getModificationDate ();, but got the same results.
Here is the code in the CGI that will grab and print it:
### Take in the passed parameters and assign them to variables
my $in = new CGI;
my $lmd = $in->param('lmd');
print LOG "System Last Modified Date is $lmd\n\n";
I've attached a doc with the screen shots of the alerts in the code above, along with some of the log file.
If I run the following from the command line:
/opt/Interwoven/TeamSite/iw-perl/bin/iwperl /opt/Interwoven/TeamSite/httpd/iw-bin/ama/formatLastModDate.cgi lmd="Thu Jun 19 14:33:37 CDT 2008"
I get back what I would expect:
{body onload="parent.getScriptFrame().populateLastModDate('Jun 19, 2008')">
Thanks in advance for the help!
One other thing I found in the access.log. I have 3 callServers going on and the other 2 show that they're passing params in the access.log while this one appears not to include it:
10.3.0.171 - - [20/Jun/2008:11:51:49 -0500] "GET /iw-bin/ama/formatLastModDate.cgi HTTP/1.1" 200 107 0 root
10.3.0.171 - - [20/Jun/2008:11:52:16 -0500] "GET /iw-bin/ama/createFeaturesCode.cgi?feature=feature HTTP/1.1" 200 2185 0 root
10.3.0.171 - - [20/Jun/2008:11:52:16 -0500] "GET /iw-bin/ama/createHeaderNavCode.cgi?cattitle=Member+Center HTTP/1.1" 200 96 0 root