6 Replies Latest reply on Oct 15, 2015 4:19 AM by Supriya Suryawanshi

    How to add custom javascript

    Sriram Pattabhiraman
      Share This:

      Hi,

      I am trying to execute java-script triggered by active link run-process. it i working for normal scripts for example below:

      <SCRIPT LANGUAGE="JavaScript">

      function testing(){

          var mylocal = "My Text";

          alert(mylocal);

          parent.F(536870915).S((new CharType(mylocal)));

      }

      </SCRIPT>

       

      But,

      Using external JS as source, i am getting error saying "Function not supported (ARERR 9369)". Below is my code:

      <SCRIPT LANGUAGE="JavaScript" src="http://crypto-js.googlecode.com/svn/tags/3.1.2/build/rollups/aes.js">

      function testing(){

          var mylocal = "My Text";

          alert(mylocal);

          var encrypted = CryptoJS.AES.encrypt("Message", "Secret Passphrase");

          parent.F(536870915).S((new CharType(encrypted)));

      }

      </SCRIPT>

      Please suggest me with following questions:

      1. Can we use custom JS in MT?

      2. Do i need to copy source JS to somewhere in MT?

      3. Is there any standard syntax is there which i may missed?

       

      Thanks

      Sriram