Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Web CMS (TeamSite)
Trouble running an ipl from FormAPI (callServer)
jdee
Trying to call an ipl using callServer with FormAPI. Doesn't seem to be getting there, likely a syntax error (onItemChange event is working). Any help appreciated:
DCT:
<script language="javascript">
<![CDATA[
function init()
{
IWEventRegistry.addItemHandler("/myitem", "onItemChange", runIPL);
}
function runIPL(myItem)
{
alert("Inside runIPL");
var parameters = new Object();
parameters.dummy="empty";
IWDatacapture.callServer("/filename.ipl",parameters,true);
}
init();
]]>
</script>
filename.ipl:
#!/global/site/vendor/InterWoven/iw-home/iw-perl/bin/iwperl
print "Content-type: text/html\n\n";
print "EOT";
print "<html>";
print "<head>";
print "<script language='javascript'>";
print "var api;";
print "api = parent.getScriptFrame();";
print "api.alert(\"Hello world!\");";
print "</script>";
print "</head>";
print "<body>";
print "</body>";
print "</html>";
print "EOT";
Thanks
jdee
Find more posts tagged with
Comments
nipper
where is the IPL located ?
Are you not seeing the alert - inside runIPL ?
crosstabgroupheader.rptdesign
jdee
The IPL is located in a branch, inside templatedata. I'm not seeing the alert
nipper
Then you have two problems.
The ipl should be in iw-bin.
However you are not even getting that far.
What is the field in the DCT you are trying to get ? Is it in a container ?
jdee
Ya, just learning about the iw-bin. I'm not trying to get anything from the DCT, I was just trying to do the callServer and return an alert (passing dummy params). Seems I need to setup the cgi before I can worry about that.
nipper
Well your JS would only trigger when /myitem is changed in the DCT.
Do you have a root element myitem ? When you type something in there
does the 1st alert pop up ?
IWEventRegistry.addItemHandler("/myitem", "onItemChange", runIPL);