I have a web enabled database that is used to gather information from the user. At one point, the user selects between one of two choices via a JavaScript prompt box. Based on their selection, I am passing a parm to a LotusScript agent to take that value and do a lookup into the database to retrieve another value associated with their selection. I then need to pass that value back to the JavaScript code so that processing can continue. I am very new to JavaScript and am trying to figure this out, but without much time left to do it in. Has anyone encountered anything like this, or does anyone have any suggestions?
Here is a snippit of code so you can see what I am trying to do:
var dbase = jsPrompt(‘[OKCancelList]’,“JayMailList”,“Please select one of the following JayMail databases”,“”, frm.JayMailDbase.value);
var system = “JayMail Notes Path”;
var mailpath = db + “/findpath?openagent&dbase=”+dbase+“&system=” + system;
if (omsWin != null && !omsWin.closed) omsWin.close();
Subject: Urgent Help Needed - JavaScript / LotusScript
Hi Deb,
This is where Ajax shines… You can find a number of examples by searching the forum, but you could probably get by with a simple implementation of the JavaScript “dblookup” code – it emulates the @Formula – check this thread – read all of them…
Subject: RE: Urgent Help Needed - JavaScript / LotusScript
Hi Gary,
Thanks for the quick and useful response. I really appreciate it. However, I have a question for you… it appears that the lookup code will return a value within the column in the view you specify. In @DbLookup you can specify either a column number or a fieldname. Is that possible with this code?
to get the actual value of the field that is displayed within that column.
Here is my delema…the view will only show one of the values that is within the field that is displayed and try as I might, I can’t get both of the values to display. What I was trying to do with the lotusscript agent was to get the actual value of the field name and then pass that back to javascript for further processing. Does that make sense?
Subject: RE: Urgent Help Needed - JavaScript / LotusScript
The JavaScript code will return a single value, but may contain multiple “values” from your view, each value separated by a comma and a space. You need to make your view display multiple values…
Try harder
Actually, I kind of think you are making it harder than it is – probably just missing something simple…