Javascript Code---------------IWEventRegistry.addFormHandler("onFormInit", init);function init(){//CALL SERVER TO UPDATE CHILDvar params;var params = new Object();var Name = IWDCRInfo.getDCRName();params.Name=Name;params.WA=waPath;IWDatacapture.callServer("http://"+server+"/iw-bin/child_update.ipl", params);}function getGenerateStatus(genSuccess) {if (genSuccess == "SUCCESS"){ IWDatacapture.refreshForm(window.location.href); } return;}
Perl Code:----------#!D:\Programs\Interwoven\TeamSite/iw-perl/bin/iwperl#======================================================================# This script is called from a DCT via FormAPI# It's purpose is to update the Child Resx#======================================================================use CGI qw(unescape);use TeamSite::Config;use AppConfig::File;use XML::Twig;use File::Find;use XML::XPath;use XML::XPath::XMLParser;use TeamSite::I18N_utils;use HTML::Entities;use Time::HiRes qw(time);use TeamSite::XMLnode;use Encode;use open ':utf8'; # makes sure that any file handles which you open are treated as utf8binmode (DCR, ":UTF-8"); binmode (STDOUT, ":UTF-8"); # these file handles are already open for you - change them to utf8binmode (STDIN, ":UTF-8");binmode (STDERR, ":UTF-8");$|=1;$cgi = new CGI();my $iw_home = TeamSite::Config::iwgethome();my $hostname = TeamSite::Config::hostname();my $iw_mount = TeamSite::Config::iwgetmount();$hostname =~ s|(.*).hrbl.net|$1|;$DEBUG = 1;$debugfilename = "$iw_home\\tmp\\test\\Resx_Child_Update.log"; debug("------RESX CHILD UPDATE LOGGING STARTED------------");my $genSuccess = "";my $change_cat = "None";my $dcr_name=$cgi->param('Name');my $workarea=$cgi->param('WA');//Code Here$genSuccess = "SUCCESS";if($genSuccess eq "SUCCESS"){debug("Im Done $genSuccess");# Pass the result back to the .jsmy ${js} .= 'parent.getScriptFrame().getGenerateStatus("' . ${genSuccess} . '" );' . "\n";print CGI::header(), CGI::start_html( -script => ${js} ), CGI::end_html();}sub debug {return unless $DEBUG;my ($message, @rest) = @_;open (DEBUG, ">>$debugfilename") or die "Can't open $debugfilename: $!\n";print DEBUG "$message\n";close DEBUG;}
Thanks for the ResponseSorry to say but it didn't work for me.