scriptBlock - Output Script

Outputs a client script.


Core Controls


<xp:scriptBlock attributes>content</xp:scriptBlock>
Table 1. Essential properties
Property Description
id Defaults to scriptBlock1, scriptBlock2, and so on.
value Specifies the client script.
Table 2. All properties
Category Properties
basics attrs, binding, charset, defer, id, loaded, rendered, rendererType, src, type
data converter, value
dojo dojoArgs, dojoEvent
styling disableTheme, themeId


This control applies only to a custom control.

At run time, the script executes when the XPage containing the custom control is loaded to the client.


This Output Script control is in a custom control. It displays an alert box when embedded in an XPage and the XPage is opened.
<xp:scriptBlock id="scriptBlock2" type="text/javascript">
	<xp:this.value><![CDATA[alert("hello custom")]]></xp:this.value>