Close browser window using FPM
Hi all,
My requirement is to close the browser window on click of a button in the webdynpro component.
I have triggered FPM event gc_event_close in after action of that view.
The window gets closed perfectly if I execute the application from SE80.
But the window is not getting closed when I run the application from portal, instead I get a message saying' The application is closed, you can now close the window'
Any pointers on closing the browser window when the application is run from portal would be of great help.
Thanks in advance.
Veda
I can confirm this behavior. You can change this behavior by adding code in process_event method.
1. Fire a portal event with
"urn:com.sapportals:navigation", "CloseWindow", ""
OR
1. Fire a Exit plug with close_window = abap_true
[http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm|http://help.sap.com/saphelp_nw70ehp1/helpdata/en/48/ca3351508f04e7e10000000a42189c/frameset.htm]
Similar Messages
-
Hi there,
After upgrading to Firefox 8 for mac osx I am unable to close a browser window using command w, or command shift w?
Is there any way I can correct this as it is very annoying?
Cheers
Guy
imac 2.93 GHz Intel Core i7
osx 10.6.8It only happens for me on pages where I've allowed some Flash element to play (I have Flashblocker) such as a YouTube video.
-
Getting hang/crash problem when I try to close browser window from applet
I have a small Apllet that has a button that calls a Javascript function in the opening window, to close the window in which it is loaded.
The Applet window is a PopUp window from one of my application's window. First time I start my application and load that Applet the button works fine. It calls the Javascript method and the Method closes the window using the self.close() method.
But now if I open the applet window again and click on the button to close the windows, it hangs. I put in trace statements and saw that it hangs on JSObject.getWindow() window.
I am using JDK Plugin 1.4.2_07 and 5.0 , if I work out on IE browser, it works fine.But when I use firefox or mozilla it gives problem of hanging/crashing.
Note that in case of 1.4.2_07 this problem experienced some times but in case of 5.0 it gives always for other than IE browser.
Please, if somebody could give me some clue about why this would happen, I will really appreciate that. and code related to this is given below
import javax.swing.JApplet;
import java.awt.*;
import javax.swing.*;
import java.awt.event.*;
import netscape.javascript.JSObject;
public class TestApplet extends JApplet implements ActionListener{
protected JButton closeButton = null;
protected JSObject win = null;
private JFrame frame = null;
private boolean alreadyClosed = false;
public void init(){
this.win = JSObject.getWindow(this);
this.closeButton = new JButton("Close Browser Window");
this.add(this.closeButton);
this.closeButton.addActionListener(this);
frame = new JFrame("Test Frame");
frame.setSize(300, 400);
frame.addWindowListener(new WindowAdapter() {
public void windowClosing(WindowEvent e) {
System.out.println("windowClosing");
alreadyClosed = true;
TestApplet.this.stop();
frame.show();
public void actionPerformed(ActionEvent ae){
stop();
public void stop() {
if (!alreadyClosed) {
alreadyClosed = true;
frame.dispose();
closeLaunchedBrowser();
System.gc();
System.runFinalization();
private void closeLaunchedBrowser() {
final TestApplet thisObject = this;
Runnable r = new Runnable() {
public void run() {
try {
JSObject win = (JSObject)JSObject.getWindow(thisObject);
if (win != null && win.toString() != null) {
//win.eval("top.opener=self;self.close();");
//win.call("close", null);
win.eval("self.close();");
} catch (Exception e) {
Thread t = new Thread(r);
t.start();
Thanks.I am waiting for any reply. I have tried for all these below options still I am getting Problem. I heard this is because of javascript, it wont call methods more times .Thats
why I need other than JSObject or java script solution.If some one know anything about this or any modifications I have to made for the below options to avoid that problem please let me know.
// URL durl = new URL(thisObject.getCodeBase(), "test/CloseMe.htm");
// System.out.println("URL :" + durl.toString());
// thisObject.getAppletContext().showDocument(durl);
// thisObject.getAppletContext().showDocument(new URL("javascript:window.close();"), "_self");
//win.eval("top.opener=self;top.close();");
//win.call("close", null);
//Object[] args = { "close", new Integer(50) };
// win.call("setTimeout", args);
//win.eval("setTimeout("close", new Integer(50));");
If it is the problem of JRE I just need it should work on 1.4.2_01 or higher.
thanks. -
Express install always asks user to close browser window
Is Adobe in charge of the code that closes browser windows at
the end of express install?
I'm currently using SWFobject 1.5 to embed my flash movie
with express install active and neither IE6, IE7 or firefox will
automatically close once express install has finished. It used to
be that IE would close and reopen the window, firefox never used to
but that's a different topic I'm sure.
Perhaps Adobe changed something?Never mind, found the answer here:
Re: Closing brower window -
How to close Browser by using a button
I want to close my browser window using a button in ADF JSF Page.
How it can be done .... ?
Regards
MS ArainThanks to all of you i got a hint from your guys which resolve the issue
however i want to share how i have resolved this issue i may be wrong
or there may be any easy alternative that is why i am sharing it.
I adopted the following steps
1. Add a New Command Button in my JSF Page
2. Attached a client listener with the command button
<af:commandButton text="Close & Exit" id="cb8">
<af:clientListener method="closeWindow" type="action"/> ---// This is the attachment syntax
</af:commandButton>
3. Define a closewindow java script as follows
<af:resource type="javascript"> --// this is how we declare/define java script in ADF
function closeWindow(actionEvent) {
window.close();
</af:resource>
Regards
MS Arain -
Close Browser window when you close 10g forms
Help Please.... I am trying to close browser window when I exit 10g forms:
Per oracle Note:115905.1
create close.html file Put the html file in the webserver root.
I created the following file in $ORACLE_HOME/Apache directory (webserver directory??)
1.)Create an html file (es. close.html):
<html>
<body onload="closeit()">
<script>
function closeit()
win = top;
win.opener = top;
win.close ();
</script>
</body>
</html>
In exit form when button pressed I have the code
web.show_document('http://apphost1.univ-wea.com:7777/close.html','_self');
The brwser window does not close automatically.
thanks,
AnithaHello this is saras from chennai.
Now i m developing oracle forms using 6i. now i m running it independantly. that is i put forms in one folder and run these forms using shortcut. If i m using the same in client machine also. But now i want to run these forms in webbrowser(client-server). for this i done the followings.
1. installing forms server and reports server.
2.Also i install IIS Server and appachie server also.
3. I had fmx files.
now i dont know the procedure to configure these web server with forms server. And i hold the fmx files in inetpub\wwroot folder.
Which one is the easy method appachiee server or iis server.
Please help me to run these fmx files in web browser.
I m eagerly waiting for your favourable reply.
saras,
[email protected]
chennai -
Hi,
How do i close a window using a button in that window.
I thought i might be able to add a windowListener to that button but that doesnt seem to work, any ideas?
Thanks
Catheg
http://www.geocities.com/rmlchan/tst.html -
Reg: To open a Browse Window Using Form Builder
Dear All,
I am trying to open a browse window using form builder.I am using forms 10g.
I have user the following code.
Declare
l_file_name Varchar2(383);
Begin
l_file_name := webutil_file.file_open_dialog( );
If
l_file_name Is Not Null
Then
If
:images.Rowid Is Not Null
Then
create_record;
End If;
client_image.read_image_file ( l_file_name, Substr ( l_file_name, Instr ( l_file_name , -1 ) ), 'images.images' );--block.item
End If;
End;I have attached the webutil.pll in attached library.
It shows an error" WEBUTIL Object group not attached to this form".
Can any one help me how to attach that object group.
Thankx in advance.
Cheers,
Jai.write this in your 'Browse' Button's , when_button_pressed trigger
DECLARE
filename VARCHAR2(500);
BEGIN
filename:=GET_FILE_NAME(' ',NULL,NULL,'Choose any directory.',OPEN_FILE,TRUE);
:txtbx3:=filename; -- Here you will assign to you form's field.
END;Edited by: Tuts009 on May 10, 2010 5:00 AM -
How i can open a browser windows using a button in jsf ?
Hi
Thank you for reading my post
how i can open a browser windows using a button in jsf ?
for example if i want to open a window which will show http://www.mywebsite.com?name=TestName&family=TestFamily
and before opening the window i need to set those two variables.
can some one help me with a solution ?
thank youHi Legolas,
Please refer to the answer provided by Chris in the EA forums.
Cheers
Giri -
How to close browser window after user log out
Hi,
Does anyone know how I can close browser window after user logs out. The scenario is when user clicks a log out button I will invalidate user session and close the browser right away in the backing bean.
Your help would be appreciated.Try run this and you'll see that it runs fine with no exceptions:
<%
String someText = "bla bla bla";
response.setContentType("text/plain");
response.setHeader("Content-Disposition", "attachment;filename=message.txt");
try {
ServletOutputStream os = response.getOutputStream();
os.write(someText.getBytes());
os.flush();
os.close();
} catch (Exception e) {
out.println("ERROR: " + e);
%>It looks like that after I've closed the outputStream I can't do any more processing in the JSP. Even if I remove the setContentType and setHeader methods it still behaves this way.
I'm starting to think that there's no way around this...?? -
Close Browser Window with view button element when view embedded into fpm
Hi,
is it possible to build a button into a component view which is embedded into a fpm to close the browser window?
tried to build a exit plug within the view/window of my component. But nothing happened. the window stays open
Maybe is it an option to fire the fpm close plug of the fpm from my component view embedded into the fpm?
Hope you can help me.
Using the close button of the fpm is not an option because the window should automaticaly close when clicking on a button embedded into my component view.
Kind Regards
RicoHello,
one more question.
Is it possible to change the method. so that the fpm opens within the same browser window instead of a new one?
Maybe is there a solution with the portal?
This is the Method to create a new Shopping cart. This opens a new browser window.
method /SAPSRM/IF_CLL_DOM_SCW_FIN~CREATE_NEW_SHOPPING_CART.
data:
LV_TASKCONTAINER TYPE REF TO /sapsrm/if_cll_task_container,
ls_obn_components type /sapsrm/s_wd_ui_obn,
lo_navigation_service TYPE REF TO /SAPSRM/IF_CH_WD_NAVI_SERV.
try.
LV_TASKCONTAINER = mo_parent_bo_mapper->get_task_container( ).
CALL METHOD lv_taskcontainer->GET_NAVIGATION_SERVICE
RECEIVING
RO_NAVIGATION_SERVICE = lo_navigation_service.
ls_obn_components-obn_system = 'SAP_SRM'.
ls_obn_components-object_type = 'sc'.
ls_obn_components-operation = 'shop'.
CALL METHOD LO_NAVIGATION_SERVICE->LAUNCH_TARGET
EXPORTING
IV_TARGET_TYPE = /sapsrm/if_ch_wd_navi_serv_c=>gc_target_type-obn
IS_OBN_COMPONENTS = ls_obn_components
IV_OBN_PARAM_CLASS = /sapsrm/if_ch_wd_navi_serv_c=>gc_param_class-taskcontainer
IV_OBN_PARAM_METHOD = 'GET_OBN_PARAMETERS_RM'
catch /SAPSRM/CX_PDO_ERROR_GEN.
endtry.
endmethod. -
Unable to close browser when using Adobe Interactive Form
Hello,
I'm using an Interactive Form in my Web Dynpro application. Everything works fine, but when the view with the Interactive Form is active, I am not able to close the browser window anymore. Moving to another view is also not possible.
I already changed all the options of the Interactive Form but always the same behaviour.
I am developing on Web AS 6.40, Service Pack 11. ADS is installed also with Service Pack 11.
Adobe Reader is Version 7.0 and Adobe Designer is Version 7.1
Has anyone an idea what's wrong?
Thanks for your help!
Best regards
ChristianHi,
I am facing a problem with viewing SAP interactive forms.
I have the SAPForms.api in Adobe reader plugins but is outdated (19th apr, 05). How do I get the new one and how do I register it ? This same scenario works on a colleague's machine with same config except the SAPForms.api which is latest. (Nov, 05)
Any pointers will be highly appreciated.
Thanks,
Samar -
Close Browser window from JApplet
I'm writing an applet that has to launch an asp page to accomplish a task. Is there any way to run this page with an AppletContext, (showDocument()) and then close the browser window without the user seeing the window open?
Thanks,
eemanuel81launch an asp page to accomplish a task.You can use the URL object in Java, this will make the http request to the asp page sharing the browser's cookie (in IE and Moz on windows).
If the applet needs to make a connection to antother server than the one the applet came from you might be in trouble. You have to sign the applet or the user needs to set up a policy for it.
Signing your applet:
http://forum.java.sun.com/thread.jsp?forum=63&thread=524815
second post
Posting data:
http://javaalmanac.com/cgi-bin/search/find.pl?words=url+post -
Close external window using Button
Hi all,
I have implemented a Web Dynpro application which runs in a portal. It opens in a separate browser window.
Now I have to implement a "close" functionality inside this application, which closes the window when the user clicks on a Button (or LinkToUrl -- never mind).
What would be the best way to implement this on NetWeaver 2004s?
Regards,
MartinHI,
You can use an external html file to close window.
Looks like your trying to close window from that window itself.
then create an close.html file and put it into mimes folder
access this file
String url = WDURLGenerator.getAbsoluteWebResourceURL(wdComponentAPI.getComponent().getDeployableObjectPart(),"close.html");
wdThis.wdGetViewController().wdFirePlugExit(url);
in close.html write a javascript which contains following function
<html>
<SCRPT LANGUAGE='JavaScript'>
function win_close()
window.parent.opener = top;
window.parent.close();
window.opener.close();
</SCRPT>
<body onlod='javascript:win_close()'>
</body>
</html> -
Placement of popup browser window using behavior
I am using the Open Browser Window behavior in Dreamweaver to show information in a popup window. My problem is that when the window comes up, the original page scrolls to the top of the page. This means that viewers have to scroll down the original page to get back to where they were after the close the popup window. Is there a way to prevent scrolling of the original page when the Open Browser Window behavior is used, or do I have to figure out how to do it with Javascript? Any suggestions would be greatly appreciated.
Is there a way to prevent scrolling of the original page when the Open Browser Window behavior is used
Yes.
Your code probably looks like this -
<a href="#" onclick="MM_OpenBrWindow(...)">
Change it so that it looks like this -
<a href="#" onclick="MM_OpenBrWindow(...); return false">
Maybe you are looking for
-
I see others have had similar issues, but I can't find an answer. I want to print the body of an email. Emailing from my Yahoo account doesn't work. I can email from a Gmail account and it does work. The email doesn't get through and I get this mes
-
Help installing Flex SDK 4.1 on Flex Builder 3 properly
Flex Builder 3 comes with SDK for 2.0.1 and 3.2 by default, so I want to add Flex SDK 4.1 I downloaded it, made a directory in the Flex Builder 3 sdks folder, and unzipped the contents there. After adding it and selecting/checking it on Flex Builder,
-
Hello - I'm pretty new to Motion and have 2 quick questions: 1) If you've got a bunch of keyframes on a timeline and want to make the entire sequence longer - is there a way to just pull the last frame out and have it automatically interpolate the ke
-
im on the latest OS. I don't have any sound playing on videos on facebook. I can listen to the music app just fine. Any ideas?
-
Details regarding Create customer master record
Hi, Can anyone gv info regarding Creating customer master record. I need Existing Bapi's for the same. Thanks in advance. Purna