Javascript and LotusScript

I am attempting to use a piece of re-usable code for field validation that will run in the Notes Client. The validation code was written in Javascript and I want to use that in my Notes application. I tried moving it to the onSubmit event, but that gets fired after QuerySave.

Is it possible to have lotusScript call javascript?

Thanks in advanced.

Subject: Javascript and LotusScript

I was able to figure it out. I moved my js file to a script file. I then included the script file in the JS Header of my form. in the JSHeader I have a function…

function validationStub(){

var bRet = true;

aRet = new Array(); //needed to pass designate elements for validation routine

var form;

form = document.forms[0];

//email

bRet = validateType(“test”, form.js, “text”, 1, aRet);

bRet = validateType(“Status”, form.Status, “radio”, 1, aRet);

bRet = validateType(“Category”, form.Category, “combo”, 1, aRet);

bRet = validateType(“Check”, form.check, “check”, 1, aRet);

bRet = validateType(“Headline”, form.Headline, “text”, 1, aRet);

bRet = validateType(“Email”, form.email, “email”, 1, aRet);

//not required

bRet = validateType(“Amount”, form.Amount, “number”, 0, aRet);

bRet = validateType(“Date”, form.date, “date”, 0, aRet);

if (validateMessage(aRet) == false) bRet = false;

}

And in the validation button…

Dim w As New NotesUIWorkspace

Call w.URLOpen(“javascript:validationStub()”)