Returns JavaScript that calls the SCORM function LMSCommit (SCORM 1.2) or Commit (SCORM 1.3).
Overloads Public Function GetJsCommit( _
ByVal checkForError As Boolean, _
ByVal includeScriptTags As Boolean, _
ByVal returnVarName As String
) As String
Overloads Public Function GetJsCommit( _
ByVal checkForError As Boolean , _
ByVal includeScriptTags As Boolean _
) As String
If not provided, the variable name "returnValue" is used.
The JavaScript from the GetJsApiLocate function must be added to your page prior to using the JavaScript from GetJsCommit.
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 GetJsCommit 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.GetJsFinish(False, True)) End With Me.RegisterClientScriptBlock("commitAndFinish", sb.ToString)
LmsApi2 Class | LmsApi Members | GetJsApiLocate | GetJsFinish | GetJsTerminate