• 刚写了个AJAX在DOMINO中最简单的应用


    实现简单的二级联动

    1、表单上创建一个组合框,ONCHANGE事件中写入如下代码

    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 a=xmldata.documentElement.text;
         document.forms[0].roomadmin.value=a;
         document.forms[0].SendTo.value=a;
      }
    }

    代理:

    Sub Initialize
     Dim s As New notessession
     Dim db As notesdatabase
     Dim view As notesview
     Dim curdoc,doc As notesdocument
     Set curdoc=s.documentcontext
     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 |<admin>|
       Print doc.admin(0)
       Print |</admin>|
      End If
      Set doc=view.getnextdocument(doc)
     Wend
    End Sub

  • 相关阅读:
    书单
    树莓派与 NATAPP 实现内网穿透
    WinForm分辨率适应-高DPI自动缩放
    ElasticSearch学习——搜索技术基础知识(上)
    JavaSE学习笔记-基础
    JavaSE学习笔记-第一个Java程序
    JavaSE学习笔记-Java开发环境搭建
    MySQL学习笔记-增删改查
    MySQL学习笔记-函数
    MySQL学习笔记-查询
  • 原文地址:https://www.cnblogs.com/hannover/p/1899913.html
Copyright © 2020-2023  润新知