Including JavaScript source code
The next piece of code includes the JavaScript code from the ds>js>delivery.js file in the page so that the functions in the code can be called from the current page.
<script language="JavaScript" src="js/delivery.js"></script>
Populating a frameset in a JSP
The next chunk of code uses the doReloadFrame, frame, and action tags from the
<js:doReloadFrame>
<js:frame
name="system"><delivery:action>system</delivery:action></js:frame>
<js:frame
name="courseTree"><delivery:action>courseTree</delivery:action></js:fra
me>
<js:frame
name="courseTools"><delivery:action>courseTools</delivery:action></js:f
rame>
<js:frame
name="activity"><delivery:action>activity</delivery:action></js:frame>
</js:doReloadFrame>
Displaying errors to the user
The next chunk of code uses the define tag of the
<bean:define id="context" name="delivery_context" scope="request" type="com.lotus.elearn.delivery.DeliveryContext"/>
<script language="Javascript">
var | mainDeliveryServerFrame = true; |
var | contentWindow = null; |
var | API = null; |
function load()
{
<% if (context.getErrorMessageKey() != null) { %>
alert("<delivery:errorMessage key="<%=context.getErrorMessageKey()%>" filter="false"/>");
<% } %>
API =
}
</script>
</head>