The following examples show templates configured to display a notification message in a pop-up dialog or as a page in the user’s browser. The final two examples show templates configured to redirect users to an alternative URL.
Pop-up dialog
JavaScript is used to display the notification message in a pop-up dialog. Note that the default template blocktemplate.html uses this method and is shown below.
<html>
<head>
<script type="text/javascript">
window.alert("%scriptmessagetitle%\n\n%scriptmessagetousers%");
</script>
</head>
<body></body>
</html>
HTML file
The notification displays as a page in the user’s browser. In this example, the message content is defined directly in the template.
<html> <head> <title>Unipraxis Advisory</title> </head> <body> <p>This Web site breaches corporate Internet usage guidelines.</p> </body> </html>
HTML file with variables
The notification displays as a page in the user’s browser. In this example, variables are used to specify the message content. Note the use of [set the pre variable for your book] tags in the message body to preserve line breaks.
<html> <head> <Title>%messagetitle%</Title> </head> <body> [set the pre variable for your book]%messagetousers%</pre> </body> </html>
Redirection to alternative URL
In this example, an alternative URL is defined directly in the template.
You must include the http:// prefix in the URL to ensure that it is interpreted correctly by the browser. No other <title> or <body> text is needed.
<html> <head> <Title></Title> <meta http-equiv="refresh" content="0;URL='http://www.hr.unipraxis.com'"/> </head> <body></body> </html>
Redirection to alternative URL
In this example, a variable is to specify the alternative URL.
In this situation, the <prohibitmessage> tag in the NBA policy or the ‘Message To Users’ setting CA DLP user policy must contain a URL that includes the http:// prefix.
<html> <head> <Title></Title> <meta http-equiv="refresh" content="0;URL='%messagetousers%'"/> </head> <body></body> </html>
| Copyright © 2011 CA. All rights reserved. | Email CA Technologies about this topic |