Skip to main content


         This documentation site is for previous versions. Visit our new documentation site for current releases.      
 

openURLInWindow

Updated on December 13, 2022

Opens an external or internal URL in a browser window. The URL can be accessed through an activity or a data transform.

Signature

openURLInWindow(options)

Returns

Not applicable.

Parameters

NameDescriptionTypeRequired
activitySpecifies the activity that returns the HTML stream for the new window. The activity is processed after a data transform.JSON object
dataTransformSpecifies the name and parameters of the data transform.JSON object
usePrimaryPageInvokes an activity based on the contents of the primary page. The default value is false.Boolean
windowPropertiesSpecifies window properties.JSON object
eventSpecifies the event that launches the window.DOM event object

JSON objects

activity
Includes an array of parameter objects. isProperty indicates whether the parameter is a property or a literal constant. The default value of isProperty is false, which means that the parameter is a constant.
{
   "name":"activityName",
   "parameters":[
      {
         "name":"param1",
         "value":"Page1.prop1",
         "isProperty":true
      },
      {
         "name":"param2",
         "value":123,
         "isProperty":false
      }
   ]
}
dataTransform
Includes an array of parameter objects. isProperty indicates whether the parameter is a property or a literal constant. The default value of isProperty is false, which means that the parameter is a constant.
{
   "name":"dataTransformName",
   "parameters":[
      {
         "name":"param1",
         "value":"Page1.prop1",
         "isProperty":true
      },
      {
         "name":"param2",
         "value":123,
         "isProperty":false
      }
   ]
}
windowProperties
The default value for Boolean properties is false.
{
   "name":{
      "value":"Page1.Prop1",
      "isProperty":true/false
   },
   "replaceHistory":false,
   "height":"number of pixels",
   "width":"number of pixels",
   "top":"number of pixels",
   "left":"number of pixels",
   "resizable":false,
   "scrollbars":false,
   "locationbar":true,
   "menubar":true,
   "statusbar":false,
   "toolbar":true
}
}
For example:
var options = {
                activity: activityJSONObject,
                dataTransform: dataTransformJSONObject,
                usePrimaryPage: boolean,
                url: "urlString",
                event: eventObject,
                windowProperties: {
                    name: {value: "Page1.Prop1", isProperty: boolean},
                    replaceHistory:  boolean,
                    height: number of pixels,
                    width:  number of pixels,
                    top: number of  pixels,
                    left: number of pixels,
                    resizable:  boolean,
                    scrollbars: boolean,
                    locationbar: boolean,
                    menubar: boolean,
                    statusbar: boolean,
                    toolbar: boolean
                }
            };

            pega.api.ui.actions.openURLInWindow(options);

Have a question? Get answers now.

Visit the Support Center to ask questions, engage in discussions, share ideas, and help others.

Did you find this content helpful?

Want to help us improve this content?

We'd prefer it if you saw us at our best.

Pega.com is not optimized for Internet Explorer. For the optimal experience, please use:

Close Deprecation Notice
Contact us