Wednesday, May 30, 2012

Making Buttons/Controls Invisible

 An Applet is being used in many views and the button/control on the applet should be visible in one view only. We need to avoid creation of multiple applets. In simple words in one view user should be allowed to perform some operation on button click while in other views he/she should not see buttons.


·         One approach is to have applet Base mode defined in the other view without buttons but it fails when multiple toggles are defined in the applet and applet defined in view is of mode type "Edit".

·         Other option is to make controls invisible. Following Browser Script code could be useful for making buttons hidden in Form Applet dynamically based on the View type.

function Applet_Load()
 var sView = theApplication().GetProfileAttr("ActiveViewName");
  case "Related Activity View":
     var ctrlSubmit = this.FindActiveXControl("Submit"); // This is the name of control = "hidden";//Setting visibility property to hidden

 t dynamically based on the View type

No comments:

Post a Comment