简体   繁体   English

如何使用Lotus公式执行javascript函数?

[英]How can I execute a javascript function using lotus formula?

I am on the web, not client. 我在网上,而不是客户端。

I need the user to press a button to execute some formula code and then execute this javascript: 我需要用户按下按钮以执行一些公式代码,然后执行以下javascript:

function submit(){    
var fein = document.getElementsByName("Payer_FederalEIN").item(0);
    var address = document.getElementsByName("InternetAddress").item(0);
    var pass1 = document.getElementsByName("Password1").item(0);

    var xmlhttp;
    if (window.XMLHttpRequest)
      {// code for IE7+, Firefox, Chrome, Opera, Safari
      xmlhttp=new XMLHttpRequest();
      }
    else
      {// code for IE6, IE5
      xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");
      }
    xmlhttp.open("GET","url,false);
    xmlhttp.send();
    }
}

When I use @URLOpen("javascript:submit()"), nothing happens and none of the formula code under that line is executed. 当我使用@URLOpen(“ javascript:submit()”)时,什么也没有发生,并且该行下的任何公式代码都不会执行。

Is there a way to do this? 有没有办法做到这一点?

Why use formula language in this context? 为什么在这种情况下使用公式语言? Change the button to Javascript and put submit() (or the entire function) in there. 将按钮更改为Javascript,然后在其中放置Submit()(或整个函数)。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM