Does anyone know how to run Javascript code (to create a cookie etc.) based on what a @DbLookup returns?
My problem is that (in a button) you can run formula language, or you can run javascript, but you can’t run both.
This causes problems because I want to lookup a user name in a list of users, check their password, and if the password matches what they just typed in, drop a cookie on their machine.
So if I use @DbLookup to check the user’s password, I can’t drop the cookie, but if I use Javascript to drop the cookie, I can’t look up the Notes database to check their username and password.
Subject: How to run Javascript code as a result of @DbLookup?
Hi LukeI suspect someone will probably suggest an easier way perhaps using a new command that does run JavaScriptr. But in the mean time I suggest one of 2 alternatives:
You could use in the formula
@command([ToolsRunMacro], “AnAgentName”)
in the agent use Print “JavaScript: …” to run a small piece of code or call a JavaScript function that you put into the form’s Head section ready to be called by the agent.
Look up the function @Eval. It is new to Domino6. It appears to run in a browser and may just allow you to call the JavaScript function that you put into the form’s Head section.
I’d first try option 2, as it is pretty quick to try and is a more direct route. If it doesn’t, I’m think method 1 will work.