概述
from: http://www.cnblogs.com/hannover/archive/2010/12/03/1895876.html
// extjs通过Post方式发送数据至服务器端
var conn = new Ext.data.Connection();
conn.request({
url : '/test/ajaxdemo.nsf/agentWebIMSendMsg?openagent',
method : 'POST',
params : {
fromUserAccount : fromusername,
toUserAccount : tousername,
message : encodeURIComponent(message)
},
success : function(responseObject) {},
failure : function(responseObject) {
Ext.Msg.alert('失败', responseObject.statusText);
}
});
//domino代理:接收并处理数据
Sub Initialize
On Error Goto ErrorHandle
Dim session As New notessession
Dim curdb As NotesDatabase
Dim curdoc As notesDocument
Dim tdoc As NotesDocument
Dim strFormular As String
dim vData As As Variant
Dim sQry As String
Dim sFrom As String
Dim sTo As String
Dim sMsg As String
Set curdb = session.CurrentDatabase
Set curdoc = session.documentContext
'--使用domino内置域Request_Content接收post方式提交的数据
'--传送数据格式为:fromUserAccount=张三&toUserAccount=李四&message=hello
strFormular="@URLDecode('Domino';Request_Content)"
vData=Evaluate(strFormular,curdoc)
sQry=vData(0)
sFrom=WebGetParameter(sQry,"fromUserAccount")
sTo=WebGetParameter(sQry,"toUserAccount")
sMsg=WebGetParameter(sQry,"message")
'----------使用数据信息----------------------
... ...
Exit Sub
ErrorHandle:
Msgbox "错误发生在第"+Cstr(Erl)+"行, 错误是: "+Error
End Sub
Public Function WebGetParameter(Byval strSearch$, Byval strVar$) As String
Const WEB_ARG_SEP = "&"
On Error Goto Errors
WebGetParameter = ""
Dim tmp$, posVar%, posSep%
posVar = Instr(strSearch, strVar & "=")
If posVar = 0 Then Goto TheEnd
posVar = posVar + Len(strVar) + 1
posSep = Instr(posVar, strSearch, WEB_ARG_SEP)
If (posSep = 0) Then
WebGetParameter = Mid$(strSearch, posVar)
Else
WebGetParameter = Mid$(strSearch, posVar, posSep-posVar)
End If
TheEnd:
Exit Function
Errors:
WebGetParameter = ""
Resume TheEnd
End Function
最后
以上就是寂寞往事为你收集整理的domino代理通过Request_Content域接收extjs以post方式提交的数据的全部内容,希望文章能够帮你解决domino代理通过Request_Content域接收extjs以post方式提交的数据所遇到的程序开发问题。
如果觉得靠谱客网站的内容还不错,欢迎将靠谱客网站推荐给程序员好友。
发表评论 取消回复