TS 6.7.1 SP1 on Linux
I have a form that has a bunch of Form API code to complete some hidden files, auto-name and save the DCR and then generate the output file...all when a user saves the DCR. I have most of the structure built for this, but am having an issue with one of my sections that tries to populate a hidden field on my DCR. The Form API code fires the callServer below and the CGI runs. It completes, from what I can tell, through the whole script, but it doesn't ever return to the populateFeaturesCode function in the Form API script. First, here is the Form API code that calls the CGI and the return function:
/**
* The buildFeatures function will read all of the
* Features DCRs and build the HTML code to write
**/
function buildFeatures() {
var parameters = new Object();
parameters.feature = "feature";
alert("About to Call Server for Features");
IWDatacapture.callServer("/iw-bin/ama/createFeaturesCode.cgi", parameters, true);
}
/**
* populateFeaturesCode function is called back from the
* callServer in buildFeatures and is passed the
* code to place in the hidden 'featuresCode' field.
* @param featurescode The HTML code block for features
**/
function populateFeaturesCode(featurescode) {
alert("Returning from Features Call Server");
alert("Featurescode is\n\n" + featurescode);
IWDatacapture.getItem("/object/Content/featuresCode").setValue(featurescode);
}
I've attached the CGI file and the log that it generates. The log contains all of the print statements through the whole script, so it appears to do what I'd expect. I do find an error in the /local/logs/iwui/error.log file though:
[Fri Jun 20 07:47:32 2008] [error] [client 10.3.0.171] malformed header from script. Bad header=Reading feature1.xml at line 3: createFeaturesCode.cgi, referer: http://tsts36.ama-assn.org/iw-cc/command/iw.ccpro.launch_edit_form?cwd.vpath=//tsts36/default/main/AMA-WWW/WORKAREA/Content/templatedata/AMA-WWW/MainContent/data/ama/pub/category&done%5ftarget=fs%5flist&full%5fredirect=true&vpath=//tsts36/default/main/AMA-WWW/WORKAREA/Content/templatedata/AMA-WWW/MainContent/data/ama/pub/category/000052.xml&done%5fpage=/iw-cc/base/util/refresh%5fdone%5ftarget%5fand%5fclose%5fwindow.jsp%3fdone%5ftarget%3dgetFileListFrame%2528%2529&locked=true
I've attached the feature1.xml file as well...it's a fairly simple DCR with 2 fields.
At this point, my
populateFeaturesCode function never fires as I never see those alerts.
Thanks in advance for any assistance!!!