Sub Initialize
Dim session As New NotesSession
Dim note As NotesDocument
Dim HTTP_Post As String
Set note = session.DocumentContext
'Gets POST information passed to server
HTTP_Post = note.Request_Content(0)
End Sub
The sample function below when passed the name of a variable submitted by the POST command will return its value.
Function getParameter(st As String) As String
Dim session As New NotesSession
Dim note As NotesDocument
Dim HTTP_Post As String
Dim myArray As Variant
Dim myVar As Variant
getParameter = ""
Set note = session.DocumentContext
HTTP_Post = note.Request_Content(0)
If ( Instr(HTTP_Post,"=") <> 0 ) Then
myArray = Split(HTTP_Post, "&")
Forall x In myArray
If ( Instr(1, x, st, 5) <> 0 ) Then
If ( Instr(x, "=") <> 0 ) Then
myVar = Split(x, "=")
getParameter = Replace(myVar(1), "+", " ")
End If
Exit Function
End If
End Forall
End If
End Function
Dim session As New NotesSession
Dim note As NotesDocument
Dim HTTP_Post As String
Set note = session.DocumentContext
'Gets POST information passed to server
HTTP_Post = note.Request_Content(0)
End Sub
The sample function below when passed the name of a variable submitted by the POST command will return its value.
Function getParameter(st As String) As String
Dim session As New NotesSession
Dim note As NotesDocument
Dim HTTP_Post As String
Dim myArray As Variant
Dim myVar As Variant
getParameter = ""
Set note = session.DocumentContext
HTTP_Post = note.Request_Content(0)
If ( Instr(HTTP_Post,"=") <> 0 ) Then
myArray = Split(HTTP_Post, "&")
Forall x In myArray
If ( Instr(1, x, st, 5) <> 0 ) Then
If ( Instr(x, "=") <> 0 ) Then
myVar = Split(x, "=")
getParameter = Replace(myVar(1), "+", " ")
End If
Exit Function
End If
End Forall
End If
End Function