I’ve got a popup window to open a form from another form’s action. There are so few fields on the popup form that it seemed like waste of space to use the entire screen. I tried to go the formula or LotusScript route but either I wasn’t doing it right or they didn’t give me the look I was wanting.
My problem is that I need to pass an identifier from the calling form to the popup form. Normally in JavaScript this isn’t that difficult but again I may not be doing it right because the client doesn’t understand when I try to pass the value. Below is my window.open statement. I used normal URL form syntax and maybe that’s my problem.
window.open(“/SI.nsf/Parts?OpenForm”, ‘newWindow’, ‘width=300,height=200,toolbars=0,status=0,scrollbars=0,resize=0,menubar=0,left=300,top=150’);
Can anyone suggest how to do this or maybe tell me how to get it working with formula or LotusScript?
Subject: window.open and javascript in Notes client
If this is for the Notes Client, you can try using a the dialogbox method from the NotesUIWorkspace.
Create an new document in the back end. Pass the fields to it from the UI document. Then dialog the newly created document.
For examlple (code a button on your main form):
Sub Click(Source As Button)
Dim ws As New NotesUIWorkspace
Dim s As New NotesSession
Dim db As NotesDatabase
Dim uidoc As NotesUIDocument
Dim newdoc As New NotesDocument(s.CurrentDatabase)
Set db = s.CurrentDatabase
Set uidoc = ws.CurrentDocument
'make sure fields are present to pass to new document
If Not CheckFields(uidoc) Then
Exit Sub
End If
Call uidoc.Save
Set doc = uidoc.Document
'inherit info from uidoc
With newdoc
.form = "lineitem"
.ParentKey = doc.UniqueKey(0)
.ClaimNum = doc.ClaimNum(0)
.InvoiceNum = doc.InvoiceNum(0)
.CaseNum = doc.CaseNum(0)
.SvcCode = doc.SvcCode(0)
.RepID = doc.RepID(0)
.ItemType = "Fee"
End With
nSuccess = ws.DialogBox(".dlgFee", True, True, False, False, False, False, "Fee Line Item", newdoc, True, False, True)
If nSuccess Then
Call newdoc.Save(true, false)
End If
Call uidoc.Refresh
End Sub
OTHERWISE…
Design your new form to inherit values from the selected document and append the &ParentUNID= to the url in your javascript call.
Subject: That syntax works for me, are you sure that SI.nsf is in the Root data directory on your server?
Subject: RE: That syntax works for me, are you sure that SI.nsf is in the Root data directory on your server?
Oh I get the popup open but I can’t pass a value from the calling form.
Subject: Well typically I would pass it into the Query_String…
var p1 = window.document.forms[0].ParmField1.value;var p2 = window.document.forms[0].ParmField2.value;
window.open(“/SI.nsf/Parts?OpenForm&parm1=” + p1 + “&parm2=” + p2, …