on 06-25-2007 9:20 AM
Hi,
I have a Web Dynpro Appliaction which would be open in a Portal iView. I have a close button in the application. How do I close the application on the click of "Close" button.
Thanks,
Prasanna.
Hi,
I am looking too for a button to close the browser window in a web dynpro application. The code, that you all posted above is very helpful, but I need it in ABAP. Is that possible? I am not expert in ABAP.
Thx a lot.
Ingmar
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
HI
1. Go to your Webdynpro component Interface View (<Your Webdynpro project> - WebDynpro - Web Dynpro Components - <your component> - Component Interface - Interface Views - <component>InterfaceView)
create a outbound plug (CloseWindow) of type exit with parameter "Url" as String
2. Go to your view controller and in the action to close the window
try{
String Url = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");
wdThis.wdGet<your component>InterfaceViewController().wdFirePlugCloseWindow(Url);
}
catch(WDURLException WDURLe){
}
3. Create a html file with following content and place it in the src --> mimes --> Components --> <your component> -- > close.html
<html>
<head>
<script langauage="javascript">
function closeWindow()
{
var currWindow = window.top;
currWindow.opener = window.top;
currWindow.close();
}
</script>
</head>
<body onload="javascript:closeWindow()">
</body>
</html>
This code will close your present explorer window.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi prasanna,
First, it is very bad decision to make decisions instead of user. Just redirect him to logoff page and let close window himself.
In WebDynpro you may use Exit plug on interface view with parameter Url (notice the case) of type string.
Then you may previously fire this plug with JavaScript url: javascript:void(window.top.close())
In recent versions of WD this will not work. So you have to redirect user via exit plug to some static html page, that contains in header <script>window.top.close();</script>
Check the below thread,u will get an solution for your question....
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.