I have tried IWDatacapture.close(true) but that doesn't work. Is there a way to force the instantiation form to close (or mimic the Cancel button) within the custom_instantiation.cfg javascript section?
Not sure if IWDatacap.close() is meant to work (can't test that out right now) but you could always brute force it via window.close() or window.location = "/iw-cc/base/close_or_home.jsp"; (don't quote me on the path to that JSP, my memory always gets it wrong).
None of those work. Thanks for the help. though. This is such a PITA.
Smitty97007 wrote: None of those work. Thanks for the help. though. This is such a PITA.
Gee - I never thought of WFM as Middle Eastern bread ;-)
You want this because you have no items to be filled on in the instantiation form or for some other reason?
Sorry, I should have specified that you'd want top.window.close() or top.window.location.. since your FormAPI would be running in an iFrame.
The use case is that we have a very simple workflow that just deploys files from our TS server to our lower level web servers (Dev/QA). We've recently added new sites that are embedded in our same main branch within certain folders that isolate those site's content from the main website. So I am expanding this simple workflow to be able to deploy files to whichever site matches the filepath - the filepath determines the site. They could choose files for multiple sites, which is a no-no. We don't want them mixing and matching content from different sites. So if I determine that they have selected files for more than one site, I want to display an alert and then close the form. This will prevent them from doing what they aren't supposed to do. In a nutshell.
Your requirement sounds like the exact scenario where I'd want the content split into separate branches... My suggestion should still work, but you might want to consider changing your approach if it's not too late.
I've been struggling with this still with IW Support. Turns out top.window.close() works with Firefox, but not with the version of IE we use (IE8). So that sort of blows since most users use IE. They are pushing IE11 out soon, but it doesn't work either, nor does Enterprise Mode.
Does top.close() work?
-David
GoingMyWay wrote: Does top.close() work? -David
No it does not in IE8, although this sems specific to TeamSite instantiation windows. IW Support is able to provide a test HTML file that will successfully execute a window.close() command in IE8. But that doesn't work in the instantiation form, either. There must be something layered into the instantiation form that is preventing a standard close function to work - otherwise IWDatacapture.close() would work.
I finally got this to work, no thanks to Interwoven, by adding a return statement after my close statement. I just sort of tripped on this solution. Solves my IE8 problem and also still works properly in FF:
if (!fnInitializeSite()) { top.close(); return;}