cancel
Showing results for 
Search instead for 
Did you mean: 

Finish button - IE - Do you want to close this window?

jharrop
Champ in-the-making
Champ in-the-making
webapps/alfresco/jsp/wizard/plain-container.jsp contains:

<h:commandButton id="finish-button" styleClass="wizardButton"
value="#{WizardManager.finishButtonLabel}"
action="#{WizardManager.finish}"
disabled="#{WizardManager.finishButtonDisabled}" />

which the web browser receives as:

<input id="wizard:finish-button" name="wizard:finish-button" type="submit" value="Finish" onclick="if(typeof window.clearFormHiddenParams_wizard!='undefined'){clearFormHiddenParams_wizard('wizard');}" class="wizardButton" />

Does anyone know where alfresco gets the javascript in @onclick  from?  I'd like to add window.close() to it.

thanks very much

Jason
1 REPLY 1

jharrop
Champ in-the-making
Champ in-the-making
I should have said by way of background that my (C#) client is kicking off the invite space users wizard in an IE window.

When the user clicks the "Finish" button at the end of the wizard, my problem is that Internet Explorer then says:

      "The Web page you are viewing is trying to close the window. Do you want to close this window"

I'd like to suppress this message.

http://dotnetslackers.com/Community/blogs/haissam/archive/2007/04/20/Javascript_3A00_-Close-window-w... explains how to do this.

i see that when i click the "Finish" button, Alfresco replies with close.jsp

11:25:54,599 http-80-Processor24 INFO  [org.alfresco.web.bean.wizard.WizardManager.finish(WizardManager.java:581)] finish –> wizard:close
11:25:54,600 http-80-Processor24 DEBUG [org.alfresco.web.app.AlfrescoNavigationHandler.handleNavigation(AlfrescoNavigationHandler.java:98)] handleNavigation (fromAction=#{WizardManager.finish}, outcome=wizard:close)

close.jsp says:

<script type="text/javascript">
if ((window.opener) && (window.opener.alfrescoCallback))
{
window.opener.alfrescoCallback();
}
window.close();
</script>

If I change this to:

<html>
<head>
<SCRIPT LANGUAGE="VBScript">
    Sub Window_Onload
      window.opener = "x"
    End Sub
</SCRIPT>
</head>
<body>
<SCRIPT LANGUAGE="VBScript">
self.close()
</SCRIPT>
</body>
</html>

then if I launch IE proper and visit close.jsp, the page will close itself.

However, the wizard still displays the message when I click "Finish"

So this is really a problem with System.Windows.Forms.WebBrowser.  Nevertheless, if I find a workaround, I'll post it here.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.