Is this possible? I want to create a web based system, where I fill out the main portion of a form, but need to add response documents but don’t want to navigate away from the form I’m on.
Is there a way to open up a popup window, fill in some information, auto create a response document and then populate the response document with the info in the popup window?
Subject: Response document via a pop up?
I’ve never tried that but as long as you save your parent doc first and pass a handle to it so the response doc knows who it belongs to, seems feasible to me.
I’ve used pop-up windows to create new docs, then when that window closes, focus is returned to the main window.
- My button on the main window has a call like this:
AddSavedSearch(form, parentType, searchQuery, dbPath);
- the function:
function AddSavedSearch(form, parentType, searchQuery, dbPath)
{
var pathName = ‘/’ + dbPath + ‘/SavedSearch?OpenForm&ParentType=’ + parentType + ‘&SrchQry=’ + searchQuery;
window.open(pathName,‘SavedSearch’,‘status=yes,resizable=yes,scrollbars=yes,screenX=100,screenY=100,width=700,height=500’);
}
- Your response doc window will need to have some code that will return to the main window. I put this in the OnUnLoad event & in my case my doc can also be opened in the main window so I need to distinguish if it’s in a pop-up or not:
if (window.opener) {
// extra stuff you won’t need removed …
window.close();
}