Rockwell Automation FactoryTalk Historian SE ActiveView 3.2 User Guide User Manual

Page 73

Advertising
background image

3

For Developers: Administering FactoryTalk Historian ActiveView

65

Else
txtServerINIURL.value = "Current Server INI URL
is not set"
End If
End Sub
</script>

Example 2 sets DisplayURL with a string from the text area.

<script language = "VBScript">
Sub btnSetServerINIURL_onclick
Dim strCurServerINIURL, strNewServerINIURL
'Get the Current ServerINIURL from the ActiveView
Control
strCurServerINIURL = pbd1.ServerIniURL
'New ServerINIURL is in the textarea.
strNewServerINIURL = trim(txtServerINIURL.value)
If strNewServerINIURL > "" _
and strNewServerINIURL <> strCurServerINIURL Then
pbd1.ServerINIURL = strNewServerINIURL
End If
End Sub
</script>

Example 3 sets DisplayURL to the file simple .pdi located in the same
directory as the Web page.

<script language = "VBScript">
Sub window_onload
Dim strPath
Dim strpdi, iCount
'-----Note that this example assumes that the
document path is an URL
' that uses a slash instead of a backslash as the
path separator.
If pbd1.DisplayURL = "" Then
strPath = document.url
strPath = Left(strPath, InStrRev(strPath,
"/"))
pbd1.DisplayURL = strPath & "simple.pdi"
End If
End Sub
</script>

Advertising