domino利用AJAX取后台数据并返回到页面
一、前端代码 //AJAX后台取数据 二、后台代理 DimsAsNewNotesSessionDimdbAsNotesDatabaseDimdocAsNotesDocumentDimdcAsNotesDocumentCollectionDimviewAsNotesViewDimcdocAsNotesDocumentSetcdoc=s.DocumentContextparList=Trim(cdoc.GetItemValue("Request_content")(0))MessageboxparListSetdb=s.CurrentDatabaseSetview=db.GetView("VTableWh2")Setdoc=view.GetFirstDocumentxml="<tableclass=tableborderwidth='70%'cellspacing='1'cellpadding='4'align='center''>"xml=xml+"<thclass='trDescribeCenter'><thclass=tdDescribeCenterwidth=10%>序号</td>"xml=xml+"<thclass='tdDescribeCenter'width=10%>姓名</td>"xml=xml+"<thclass='tdDescribeCenter'width=10%>职务</td>"xml=xml+"<thclass='tdDescribeCenter'width=10%>分机</td>"xml=xml+"<thclass='tdDescribeCenter'width=15%>直线电话</td>"xml=xml+"<thclass='tdDescribeCenter'width=15%>手机</td>"xml=xml+"<thclass='tdDescribeCenter'width=15%>传真</td>"xml=xml+"<thclass='tdDescribeCenter'width=15%>房间号</td></tr>"temp1=""i=1WhileNotdocIsNothingIfdoc.TSeqNo(0)="01"Then//安装序号大小将新的部门名称单独显示为一行temp1="<tr><tdcolspan=8class=tdborder><b>"+doc.TDepartment(0)+"</b></td></tr>"temp1=temp1+"<tr><tdclass=tdborderalign=center>"+doc.TSeqNo(0)+"</b></td>"Elsetemp1="<tr><tdclass=tdborderalign=center>"+doc.TSeqNo(0)+"</b></td>"EndIf'超链接'temp1=temp1+"<tdclass=tdborder>"+doc.name(0)+"</td>"temp1=temp1+"<tdclass=tdborder><ahref=/bsoa/config.nsf/0/"+doc.UniversalID+"?OpenDocumenttarget='_blank'>"+doc.name(0)+"</a></td>"Ifdoc.HasItem("TRank")Thentemp1=temp1+"<tdclass=tdborder>"+doc.TRank(0)+"</td>"Elsetemp1=temp1+"<tdclass=tdborder></td>"EndIfIfdoc.HasItem("Tel")Thentemp1=temp1+"<tdclass=tdborder>"+doc.Tel(0)+"</td>"Elsetemp1=temp1+"<tdclass=tdborder></td>"EndIfIfdoc.HasItem("Tel2")Thentemp1=temp1+"<tdclass=tdborder>"+doc.Tel2(0)+"</td>"Elsetemp1=temp1+"<tdclass=tdborder></td>"EndIfIfdoc.HasItem("TMTel")Thentemp1=temp1+"<tdclass=tdborder>"+doc.TMTel(0)+"</td>"Elsetemp1=temp1+"<tdclass=tdborder></td>"EndIfIfdoc.HasItem("Fax")Thentemp1=temp1+"<tdclass=tdborder>"+doc.Fax(0)+"</td>"Elsetemp1=temp1+"<tdclass=tdborder></td>"EndIfIfdoc.HasItem("TRoom")Thentemp1=temp1+"<tdclass=tdborder>"+doc.TRoom(0)+"</td></tr>"Elsetemp1=temp1+"<tdclass=tdborder></td></tr>"EndIfxml=xml+temp1Setdoc=view.GetNextDocument(doc)i=i+1WendMessageboxCstr(i)xml=xml+"</table>"cdoc.rtfThemesHtmlMX(0)=xml'Print"Content-type:text/xmlcharset=GB2312"'Print|<?xmlversion="1.0"encoding="utf-8"?>|Print"Content-type:text/xml;charset=GB2312"'指定页面编码注意Print|<?xmlversion="1.0"encoding="GB2312"?>|'指定XML文件编码Printxml (编辑:李大同) 【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容! |