How Lotus script receives post data. Obtained from the IBM website

Source: Internet
Author: User

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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.