Asked By
40 points
N/A
Posted on - 04/17/2012
Java Script Functions in JS Header be used in Lotus Script Agent?
Basically, Java script is a client side script which is used in web application. You can use it in verify a form in HTML, you can also use it in anything animation perposes. So obviously you can used Javas cripts in JS header in lotusscript agent.
Put a deeper view below-
Here I will show you how can you run a web agent on any javascript event.
1.      You have to generate your desired XML variation. It is a need to use in the agent which using javascript.
2.      Now call the agent by using the javascript.
3.      As whatever you like to response, use the agent.
Â
Now you can place the two javascript functions in the JS Header of your form-
Â
// Builds the XML variables
that will be sent to the agent.
function BuildXMLVariables()
{
var objDOM = new ActiveXObject
("Microsoft.XMLDOM")
Â
RootEl = objDOM.createNode(1,
"RootElement", "")
objDOM.documentElement = RootEl
Â
// add as many of these nodes as
you need.
// these variables will be accessible
via the agent.
objHeaders = objDOM.createNode
(1, "DocID", "")
objHeaders.text = document.all.
DocumentID.value
RootEl.appendChild(objHeaders)
Â
objHeaders
Â
Â
Â