I love this login control and have adapted it to several other purposes, however, my current login process utilizes a rather lengthy and complex lotusscript which is called by an agent. I have, so far, been unsuccessful in my attempts to call the agent from within the dojo login control. The ability to call outside agents on submit would greatly enhance the utility of this feature.
When using the code below, I receive an error stating the 'database' is not defined. This is standard javascript code. Does Dojo require a different code?
var agentName = "agentName";
//get the input parameter
var username = dojo.byId('#{id:username}').value;
var password = dojo.byId('#{id:password}').value;
//create In Memory Document
var doc = database.createDocument();
doc.appendItemValue("UserName",username);
doc.appentItemValue("Password",password);
var agent = database.getAgent(agentName);
if (agent != null) {
agent.runWithDocumentContext(doc);
}