Skip to Content
author's profile photo Former Member
Former Member

close browser on logout

Hi,

When I click Logout on Infoview page browser should close automatically.

BO : XIR 3.1 Sp6

OS : AIX 7.1

Application server : tomcat

Tried below steps to resolve the Issue.

Added the following line in web.xml of InfoViewApp

<context-param>

<param-name>url.exit</param-name>

<param-value>http://servername:8080/InfoViewApp/logoff.jsp</param-value>

</context-param>

created logoff.jsp in /tomcat7/InfoViewApp and pasted the below lines

<html>

<head>

<body onload=top.close()>

</body>

</html>

Also tried the below codes

<!DOCTYPE html>
<html>
<body>

<input type="button" value="Log Out" onclick="self.close()">

</body>
</html>


**********************************


<!DOCTYPE html>
<html>
<body>

<a href="javascript:close_window();">Log Out</a>

</body>
</html>

********************************


<!--

function closeIt() {
close();
}

// -->
</script>

Please do the Needful


Regards,
Raj

Add a comment
10|10000 characters needed characters exceeded

Related questions

1 Answer

  • Posted on Jul 22, 2014 at 08:06 PM

    Hi Raj,

    Include the below code in your logoff.jsp

    =========================================

    <html>

    <head>

    <title>Close the browser with a button using Javascript</title>

    <script language="JavaScript">

    window.parent.close();

    </script>

    </head>

    </html>

    ============================================

    Thanks,

    Prithvi

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.