Hi,
well, we do this internally as well (e.g. in our mailto-component...). I just checked the JS code there:
Code:
RISCUtil.openURLAndClose = function(url,target)
{
if (this.m_openURLCounter == null)
this.m_openURLCounter = 0;
this.m_openURLCounter++;
if (target == null)
{
target = "windowtobeclosed"+this.m_openURLCounter;
}
if ("_self" != target)
{
var w = window.open(url,target);
CCJSUtils.invokeFunctionWithDelay
(
function(pWindow)
{
return function()
{
if (pWindow && pWindow.open && !pWindow.closed)
pWindow.close();
};
}(w)
,500
);
}
};
The CCJSUtils.invokeFunctionWithDelay is some wrapping of setTimeout(...) coming from JavaScript.
So you see: open + close (with a delay of 500ms). We also use water for ccoking...
If there is some better solution: we are open to listen! ;-)
Kind regards! Björn