Activeview control events, Beforeconnection event – Rockwell Automation FactoryTalk Historian SE ActiveView 3.2 User Guide User Manual

Page 77

Advertising
background image

3

For Developers: Administering FactoryTalk Historian ActiveView

69

ActiveView Control Events

BeforeConnection Event

This event occurs before a connection to the Historian Server is attempted.
This allows the programmer to alter the user name and password so that
logging into the Server is not apparent to the user. When the call returns,
connection is attempted.

Format

BeforeConnection (myParam as BCParam)

Example

The following is an example of using JavaScript to use the security events:

<html>
<head>
<script language = "VBScript">
Sub window_onLoad()
Pbd1.DisplayURL = "<MyDisplayURL>"
End Sub
</script>
<script id = "clientEventHandlersJS" language = "javascript">
function Pbd1_BeforeConnection(pParam) {
pParam.Username = "MyUserName";
pParam.Password = "MyPassword";
}
</script>
<script language = "JavaScript"
for = "pbd1"
event = "BeforeConnection(pParam)">
Pbd1_BeforeConnection(pParam)
</script>
</head>
<body>
<p>
<object id = "Pbd1"
width = "700"

Advertising