calling javascript from java script

Greetings,

I would like to have my Scriptable Java script (BeanShell) call another script written in Javascript with 3 values (obtained as parts of DATARECORD), then use a value returned by the javascript.
How do I call another script from a script, and how do I pass values (session.get(set)Variable?)
between Java and Javascript?

Thank you!

I'm not sure I follow. I

I'm not sure I follow. I think you're looking for session.executeScript(), but if not, please clarify.

I am trying to scrape a value

I am trying to scrape a value obscured in the page source code that requires javascript to become apparent.
For example:

<a href='javascript:let("274 458 550 540 440 268 338 3 3 268 597 44 188 274 44 179 268 51 635 550 338 51",649,387).

We have javascript 'let' function which is part of certain script.js.
I tried to call this script.js from my interpreted Java script to decypher the value and pass values using session.getVariable method but I did not even get session.log output.

My test javascript code attempt was:

var gr = session.getVariable("emCode");
var al = session.getVariable("emKey1");
var tr = session.getVariable("emKey2");
session.log("emCode: " + gr);
function let(gr,al,tr) {
        var = gr + al + tr;
        session.setVariable("allTogether", allTogetherNow);

And interpreted Java:

EmailCode = XMLFormat(dataRecord.get( "ep_EmailCode" ));
EmailKey1 = XMLFormat(dataRecord.get( "ep_EmailKey1" ));
EmailKey2 = XMLFormat(dataRecord.get( "ep_EmailKey2" ));

session.setVariable("emCode", EmailCode);
session.setVariable("emKey1", EmailKey1);
session.setVariable("emKey2", EmailKey2);

session.executeScript("AAA_script.js");

BackFromJS = session.getVariable("allTogether");
session.log("back from js: " + BackFromJs);

}

Thank you again.

the example got mauled, it

the example got mauled, it was "javascript:let("274 458 550 540 440 268 338 3 3 268 597 44 188 274 44 179 268 51 635 550 338 51",649,387)."

problem solved: matched

problem solved:
matched pattern triggered 2 scripts,
1st javascript which got variables from the DATARECORD,
processed them, and set a session variable.
2nd interpreted java which took the rest of variables from the same DATARECORD, the session variable from the javascript, processed them for an output file, then reset session variable to an empty string.