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)
Hide the cgi-callout button
Annad
Hi
I have a cgi-callout button on my DCT that I want to hide when the save action on the DCT is done successfully.
Here is the datacapture.cfg file and the javascript I am using for the FormAPI.
---------------------------------------
<?xml version="1.0" encoding="ISO-8859-1"?>
<!DOCTYPE datacapture SYSTEM "datacapture6.0.dtd">
<data-capture-requirements type="content" name="wireframe">
<ruleset name="TeamSite Templating">
<item name="myButton">
<hidden>
<cgi-callout label="My Button"/>
</hidden>
</item>
<script language="javascript" location="template-type" src="test.js"> </script>
</ruleset>
</data-capture-requirements>
--------------------------------------
Here is the .js file
------------------------------------------
function init () {
alert("Hi Anna");
//Then you register you EventHandlers in this function
IWEventRegistry.addItemHandler("/myButton", "onCallout", sayHello);
IWEventRegistry.addFormHandler("onSave", saveHandler);
}
function sayHello () {
alert("inside sayHello function....");
}
function saveHandler() {
alert("saved now...");
IWDatacapture.getItem("/myButton").setVisible(false);
return true;
}
IWEventRegistry.addFormHandler("onFormInit", init);
------------------------------------------
However, when the save button is clicked, the alert ("saved now..") pops up but the callout button on the DCT does not disappear.
Can anyone please help me with this?
Thanks,
Anna
Find more posts tagged with
Comments
There are no comments yet