Implement simple level-2 Interaction
1. Create a combo box on the form. Write the following content to the onchange event:Code:
VaR Se = This. selectedindex;
VaR xmlhttp_request = "";
Xmlhttp_request = new activexobject ("Microsoft. XMLHTTP ");
If (! Xmlhttp_request ){
Xmlhttp_request = new activexobject ("msxml2.xmlhttp ");
}
VaR url = "fill? Openagent & t = "+ this. Options [se]. Text +" & id = "+ document. Forms [0]. curdocid. value;
Xmlhttp_request.open ("get", URL, true );
Xmlhttp_request.send (null );
Xmlhttp_request.onreadystatechange = fill;
Function fill (){
If (xmlhttp_request.readystate = 4 & xmlhttp_request.status = 200 ){
VaR xmldata = xmlhttp_request.responsexml;
VaR avel xmldata.doc umentelement. text;
Document. Forms [0]. roomadmin. value =;
Document. Forms [0]. sendto. value =;
}
}
Proxy:
sub initialize
dim s as new notessession
dim dB as notesdatabase
dim view as notesview
dim curdoc, doc as notesdocument
set curdoc=s.doc umentcontext
dim URL, R as string
url = curdoc. query_string_decoded (0)
r = right (URL, (LEN (URL)-instr (URL, "&")-2)
url = r
r = left (URL, instr (URL, "&")-1)
set DB = S. currentdatabase
set view = dB. getview ("v_roomlist")
set Doc = view. getfirstdocument
while not Doc is nothing
If Doc. room (0) = r then
print | Content-Type: text/XML; charset = UTF-8; |
print | |
Print Doc. admin (0)
print | |
end if
set Doc = view. getnextdocument (DOC)
Wend
end sub