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)
change function of Preview and Generate
pietje
Hi,
We are using teamsite 5.5. I now we can't change the name of the buttons and can't make them invisible.
We want to change the functionality from these buttons is this possible. We now there are no events thrown by this button. The documentation is giving the following example code:
function saveHandler(button) {
switch (button) {
case IWDatacapture.SAVE_BUTTON:
case IWDatacapture.SAVEAS_BUTTON:
case IWDatacapture.SAVECLOSE_BUTTON:
// User clicked 'Save', 'Save As' or 'Save and Close'
...
break;
case IWDatacapture.PREVIEW_BUTTON:
case IWDatacapture.GENERATE_BUTTON:
// User clicked 'Preview' or 'Generate'
...
break;
}
}
When we copy it in the datacapture file it isn't working. What do we have to do to make this working. Is it possible to change the functionality of these buttons.
With kind regards,
pietjev
Find more posts tagged with
Comments
Michael
Hi pietjev
It is not supported by Interwoven to hide the buttons in TeamSite 5.5. This is out-of-the-box functionality in TeamSite 6 though -- yet another reason to upgrade
However, I have attached a script which should enable you to hide the buttons in an unsupported manner (if you so choose).
Hope this helps?
Cheers, Michael
pietje
We don't want to delete the buttons but to change the functionality and to change the name. Changing the functionality is the most important part.
Michael
What exactly is the functionality that you want to provide? You can do some things in the PT but it really depends on what you need.
Cheers, Michael
pietje
We want to do a remote server call [callServer()] to the interwoven server to launch a couple of perl scripts.
Michael
Hi
callServer() is a formAPI call -- you use formAPI in your DCT not your PT. If you want to kick off a perl script from your PT how about using a iw-perl tag and calling it in there?
Alternatively you can use callServer() in your DCT on something like an onSave event.
Hope this helps?
Cheers, Michael
jwl
Hi Michael
I was unable to get your code to have any effect on my SaveAs button (using the code as-is). I placed the js file in the same folder as datacapture.cfg, and placed the line
<script language="javascript" location="template-type" src="ButtonDisabler.js"/>
just above my FormAPI SCRIPT tag.
What else do I need to do? Do I need to call the handleButtons() function explicitly?
Thanks