Returns JavaScript that calls the SCORM function LMSFinish (SCORM 1.2) or Terminate (SCORM 1.3). See Techniques For Calling LMSFinish (1.2) or Terminate (1.3) for more information.
Overloads Public Function GetJsTerminate( _
ByVal checkForError As Boolean, _
ByVal includeScriptTags As Boolean, _
ByVal returnVarName As String _
) As String
Overloads Public Function GetJsTerminate( _
ByVal checkForError As Boolean, _
ByVal includeScriptTags As Boolean _
) As String
The JavaScript from the GetJsApiLocate function must be added to your page prior to using the JavaScript from GetJsTerminate.
You can use the server side RegisterClientScriptBlock method to add the JavaScript from any LmsApi GetJs function to your HTML page.
The JavaScript returned from GetJsTerminate will do all of the following:
The following example assumes the VBTrain.WebTracking namespace has been imported.
[Visual Basic]
Dim apiObject As New LmsApi2() Dim sb As New StringBuilder() With sb .Append(apiObject.GetJsApiLocate()) .Append(apiObject.GetJsCommit(False, True)) .Append(apiObject.GetJsTerminate(False, True)) End With Me.RegisterClientScriptBlock("commitAndTerminate", sb.ToString)
LmsApi2 Class | LmsApi Members | Techniques For Calling Terminate |GetJsApiLocate | GetJsCommit