Wednesday, May 30, 2012

Disable The Button To Prevent The Double Click


We have scenario like where we have payment interface which has been triggered by Payment button on Payment applet. Now customer want to make sure this button would be pressed only once till the request is not get processed successfully.


This can be achieved by two options. First one is browser script and another is very siebel and also applicable for eService as well

·         Go To Applet Control

·         Select Payment Control and Go to HTML attribute of this control.

·         Copy below value in HTML Attribute:

                onclick="function fn1(){disabled=true;}setTimeout(fn1, 100);"

            Note: Here 100 is timeout interval in ms.

Adding asterisk * on a field which is not marked as REQUIRED

We have scenario like where we have to show a * on a field in Siebel which is not marked as REQUIRED in configuration.
Let’s say requirement is to show the red asterisk ( * ) on “Main Phone Number” field on Contact Form Applet.


·         Select the appropriate applet ( In our example “Contact Form Applet” ) and check the edit web layout option.
·         Select the properties of the desired field ( In our example “Main Phone Number” ).
·         Under Caption String-Override add the following HTML code.

     <body><font size=”3″ color=”#FF0000″> *</font> Main Phone Number</body>

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