I just wrote the simplest application of Ajax in Domino.

Source: Internet
Author: User

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

Related Article

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.