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)
Disable preview and Generate in "View"
System
We have disabled the generate and preview buttons within the DCT using FormApi, but have just realized that when the user clicks the "View File" button rather than the "Edit File" button, The preview and generate buttons are working.
This is obviously because FormApi is not used in View mode, but the question is "how do we stop this from happening?"
Any ideas?
Find more posts tagged with
Comments
pawanjit
How have you disabled preview and generate buttons using FormAPI? There is a technote - 50226 on the knowledge base site that talks about the ways to disable it. However, there is a problem with that method. If the DCR has already been saved, the preview and generate buttons will work.
If you have not followed the same method as defined in tech note 50226, I am quite interested to learn about your solution.
Thanks!!
Migrateduser
No we didn't use the method in technote 50226. Instead, we just accessed the functions in the top frame using javascript objects. It seems to work a little better than the method in the technote.
//Running the rplcGenAndPrev() method will disable the Preview and generate buttons in the top frame of
// the dct
myInterval = self.setInterval('rplcGenAndPrev()',1000);
//This function disables the preview and Generate buttons in the top frame of the dct. It replaces
//each button's url with a javascript alert box which prompts the users to use the buttons inside the form.
function rplcGenAndPrev(){
//try{
if(parent.frames[1].document.links[4].href){
parent.frames[1].document.links[3].href="javascript: alert(\"The button you have selected has been disabled. Please preview content by using the Preview button below.\")";
parent.frames[1].document.links[4].href="javascript: alert(\"The button you have selected has been disabled. Please preview content by using the Preview button below.\")";
parent.frames[1].document.images[4].alt="The preview button has been disabled";
parent.frames[1].document.images[5].alt="7"; //The generate button has been disabled
self.clearInterval(myInterval);
}
This method was based on another forum posting, though I can't remember the number.