0

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:

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.

Is there a way to do this?

1 Answer 1

1

Why use formula language in this context? Change the button to Javascript and put submit() (or the entire function) in there.

Sign up to request clarification or add additional context in comments.

2 Comments

I need to execute formula code as well. I need to alter a field that is hidden in notes and when i do it in javascript, it throws the field to the bottom left of the form for some reason.
Nevermind, I figured out how to do everything I wanted in javascript. Thanks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.