I have a frameset with 2 frames. The left frame contains a AName field and a number of menu options. The right frame uses an agent to generate a dynamic form.
The agent, which is in Lotus Script, needs to be able to pick up the value of the AName field. I have tested the following code, which does not appear to be working:
Dim session As New NotesSession
Dim db As NotesDatabase
Dim dc As NotesDocumentCollection
Dim doc As NotesDocument
Dim displaydoc As NotesDocument
Dim sName As String
Dim sFormattedDate As String
Set db = session.CurrentDatabase
Set doc=session.documentcontext
Print doc.AName(0)
Exit Sub
There is no error generated, however the value of the field is not printed. This field is a drop down list, so maybe my syntax for this is incorrect.
Any ideas or suggestions would be greatly appreciated - thanks in advance.
Subject: Agent to get value of field in different frame
Are you developing for client or web.if web then you will ahve to acces the field in other frme with javascript
the code is something like
window.parent.left.document.forms(0)fieldname.text
then you run the agent with url passing the value in query string and using
query string decoded to access the value
Subject: RE: Agent to get value of field in different frame
This is for the web - I’ll try to pass the data along in the query string.
Thanks.
Subject: RE: Agent to get value of field in different frame
OK - This is what I have done.
On the onChange of the listbox, I amusing the following javascript:
var form = document.forms[0];
strPath = new String(window.location.pathname);
var dbName = strPath.substr(1, strPath.indexOf(“.nsf”, 0) + 3);
url = “/” + dbName + “/LoadMainPage?OpenAgent&NAME=” + (form.AName.options[form.AName.selectedIndex].text);
document.location = url + “target=body”;
I want the agent to open in the right portion of the screen, but it opens in the left hand portion - replacing the menu.
Am I doing something wrong? Thanks for the help.
Subject: RE: Agent to get value of field in different frame
you need to set the target to the right frame .
Some javascript code is like this i dont remember exact one
onclick=window.open(url, “right”);
if right is the name of the right frame
url the url for agent call with wuerystring
or right the javacsript code in the on select of the dialog list