Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
THRUST SERVICES & TOOLS
CLOUD EDITIONS
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
can't run cgi thru formAPI
KTR
We are in Teasmite5.5.2 on Unix
I want to generate xml automatically, when the user click "Save/SaveAs" in DCT. I am able to see all info. thru alert stmts, but, I am sure that it's not firing the cgi script( I am printing the passed variable to one text file). Here is the code for formAPI and cgi. Any help in this is greatly appreciated.
======formAPI code===========
function saveHandler( button ) {
dcrName = IWDatacapture.getItem("/Control/dcrName");
var filevalue = dcrName.getValue();
dcrName = pathPrimary + pathSecondary + pathTertiary + "/" + filevalue;
// alert ("DCR NAME " + dcrName);
IWDCRInfo.setDCRName(dcrName, null);
runGenerate();
return(true);
}
function runGenerate()
{
var params = new Object();
var dcrpath = workarea + '/' + templatedata + '/' + categoryAndType + '/data/' + IWDCRInfo.getDCRName();
alert("dcrpath is " + dcrpath);
params.dcrpath = dcrpath;
var server = window.location.hostname;
var url = "http://"+server+"/iw-bin/generatePage.cgi";
IWDatacapture.callServer(url, params, true);
return(true);
}
=======cgi script as follows =====
#!/usr/iw-home/iw-perl/bin/iwperl -w
use CGI qw(:standard);
&CGI::ReadParse;
$|=1;
my $cgi = new CGI();
my $dcrpath = $cgi->param("dcrpath");
print "Content-type: text/html\n\n";
open (FILE, ">>/export/home/tkumbum/test.txt") or die("Couldn't open file \n");
print "Hello We are here -- testing";
print "DCR FULL PATH:$dcrpath <br/>";
close(FILE);
exit;
Find more posts tagged with
Comments
KTR
It's solved now
mgal
What was the issue?
Thxs.
Mohammed Gazal.
AKB
may be Apache was not configured properly to execute perl under iw-bin
Migrateduser
Hi KTR,
would be great if you could post the corrected version too..
We urgently need it to solve a problem in our dcr -> html gen
regards
Martin Tauer
pacer11
Hi,
I was looking at your post, and it is something sorta similar to what I am trying to construct.
I have one question, how did you get the vpath information from FormAPI (It's probably unsupported but I would like to know anyway)
Thanks!