1

What is the alternative to Siebel's BrowserScript function ShowModalDialog() to launch a HTML page from Siebel on Chrome? The method is deprecated on Chrome, FireFox. It works on IE, but Chrome users get an error message.

My code:

function Applet_PreInvokeMethod (name, inputPropSet)
{
    //other code
    var ShowModalOptions = "dialogHeight:150px;dialogLeft:120px;dialogWidth:450px;scrollbars:no";
    var sFileSelected = theApplication().ShowModalDialog("FilePicker.htm", "", ShowModalOptions);

    //other code
}
KiranM
  • 1,306
  • 1
  • 11
  • 20

1 Answers1

1

We're having similar issue. In High Interactivity (only in Internet Explorer) it works fine. However, we are supporting other browsers in OpenUI where this problem emerges.

Briefly, we tackle the problem like this:

  • we distinguish if we are in OpenUI or High Interactivity
  • if it's High Interactivity (therefore it runs Internet Explorer) -> everything stays as before
  • if it's OpenUI -> we use our custom dialog in jquery in Presentation Model

In applet method we keep everything as before if the it's not OpenUI:

function Applet_PreInvokeMethod (name, inputPropSet)
{
    //other code
    if (!IsOpenUI) {
         var ShowModalOptions = "dialogHeight:150px;dialogLeft:120px;dialogWidth:450px;scrollbars:no";
         var sFileSelected = theApplication().ShowModalDialog("FilePicker.htm", "", ShowModalOptions);

         //other code
    }
}

Then, we introduce Presentation Model in OpenUI for the particular applet:

presentation model for the applet {
...
    function PreInvokeMethod(methodName, psInputArgs, lp, returnStructure) {
        try {
           if (methodName == "MethodName") {
                // show jquery dialog having similar to FilePicker.htm
                ...
                // other code
            }
        }
    }   
...
}

You will need to duplicate code (for HI and OpenUI), you will need to keep your FilePicker.htm and u will need to make similar dialog for OpenUI.

Václav Struhár
  • 1,739
  • 13
  • 21