Maximize and closing browser window

Hi all.
I have two problems.
I'm running a form in separateframe =true. I want to maximize the browser window. How can I do this???
The second problem: how can I close the browser window? I have create a post-form trigger and I put this code: web.show_document('JavaScript:window.close();','_self');
but nothing appens. Is there someone that can help me???
Thank you all,
Fabrizio

For closing the browser window after closing a form you need to create an html file with the following code in it.
for Internet Explorer:
<html>
<body onload="closeit()">
<script>
function closeit()
     win = top;
     win.opener = top;
     win.close ();
</script>
</body>
</html>Place this file where Oracle HTTP server can read (virtual directory) and call in in a post form trigger with web.show_document.
WEB.SHOW_DOCUMENT('http://machinename.domain:portno/mydirectory/close.html',
'_self');Make sure you use _self to the close the applet browser.
You can sue the same method to maximize the browser window too with the appropriate code.
Regards,
Tony

Similar Messages

  • Popup to confirm when closing browser window?

    Hi
    I want to display popup confirm window when closing browser window, "changes will be lost" yes or no. for this i searched forums got some idea, about "WORK PROTECT MODE". this will work only when our application running from portal. my doubt is where should i write code for this??? any help
    Thanks,
    kris.

    Hi Thomas,
    We are on ECC6.0 enph5.
    In system configuration in epc.loader(service) the value for work protect mode is set as 1 - Protect unsaved data (open page in a new window) 
    1)Is it possible to override this value within WD ABAP application? for example show popup window when there is unsaved data
    2)In this scenario what is the significance of L_PORTAL_MANAGER->SET_WORK_PROTECT_MODE
    and   L_PORTAL_MANAGER->SET_APPLICATION_DIRTY_FLAG
    3)Where exactly  L_PORTAL_MANAGER->SET_APPLICATION_DIRTY_FLAG has to coded. It does trigger modify method of the view.
    Thanks,
    chamu

  • Whenever I open new tabs Firefox crashes and the browser window closes automatically.what will I do?

    I am facing this problem since a month.I never faced this problem before.I always feel good to use Mozilla Firefox as my browser.I used to open multiple tabs in a same browser window.For example- in a tab I logged in to Facebook,at same time I might be downloading songs or something else or open another site in the other tab.It might be 2 or 3 tabs sometimes.But now a days,I am facing the problem whenever I open multiple tabs.Its unusual and so much annoying.The Firefox crashes and the browser window closes showing a messege to send an error report.Please Help me.
    N.B. - I am using the Windows service pack 2.
    RAM - 2 GB
    Hard disk MEmory - 250 GB.

    I had this same problem. Seems to be caused by the web developer tool bar FF extension (this started happening after a recent update to that extension). After disabling it, my FF is back to normal :)

  • Help!! Closing browser window when form closes

    We have migrated from forms 5.0 to Forms 6i, running the forms on FormsServer 6. When I click on the exit button which executes exit_form, the applet window area clears and the browser window remains open. Is there a technique to close the browser window?
    Thanks in advance,
    Ed
    [email protected]

    Hi there,
    Write a Post-Form trigger with the following line of code:
    Web.Show_Document('teclose.html','_self');
    The code for teclose.htm is as follows:
    <html>
    <body onload="closeit()">
    <script>
    function closeit()
    window.close();
    </script>
    </body>
    </html>
    Don't forget to include the path in web.show_document to access the teclose.htm. See the
    help on web.show_document in forms help.
    Hope that will solve your problem.
    Thanks
    Pranati

  • How to show a confirmation when closing browser window in jdeveloper11g

    Hi
    I'm Using Jdev 11g
    How to show a confirmation when closing browser window in jdeveloper11g
    Regards
    Abhilash

    Abhilash,
    My goodness...
    Didn't search the forum, eh? In fact, didn't even look at the last 5 or 6 posts - this was posted by another user within the past few hours.... Giving a message while closing a jspx page.
    John

  • CFFORM and scrolling browser window

    Having an issue with cfform where, after the form loads, I
    cannot select items in a cfgrid if the browser window is scrolled.
    It doesn't seem to matter where the grid is located on the page -
    items can only be selected in the grrid when the browser window is
    in its default position. If I scroll the page down, it ceases to
    function; scroll it back, and it works. This only seems to occur in
    Firefox - MSIE (surprisingly) works okay for the most part.
    Anyone know of a fix for this?

    For closing the browser window after closing a form you need to create an html file with the following code in it.
    for Internet Explorer:
    <html>
    <body onload="closeit()">
    <script>
    function closeit()
         win = top;
         win.opener = top;
         win.close ();
    </script>
    </body>
    </html>Place this file where Oracle HTTP server can read (virtual directory) and call in in a post form trigger with web.show_document.
    WEB.SHOW_DOCUMENT('http://machinename.domain:portno/mydirectory/close.html',
    '_self');Make sure you use _self to the close the applet browser.
    You can sue the same method to maximize the browser window too with the appropriate code.
    Regards,
    Tony

  • Problem in Closing Browser window from an Applet.

    I have wriiten a small Applet progarm 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 and then close the frame window,it works fine that the browser window will close, when the frame window is closed.It calls the window closing event in that applet stop method is called and In stop methd a closeLaunchedBrowser method will called this has a Javascript method and the Method closes the window using the self.close() method.
    But now if I continue this process of launching applet and then closing frame window, initial 1 or 2 steps it has know problem when I continue this, after 3 or 4 steps, it result in browser hang/crash.
    I am using java version 1.4.2_01 or higher and IE or Firefox(any other NetScape based) browser to load applet.It works fine with IE but getting problem in case of Firefox(any other NetScape based).
    The error dialog information and related event log generated is shown below :
    The dialog which is displayed before crashing of firefox has information :
    "firefox.exe has generated errors and it will closed by windows.you will need to restart the program.
    An error log is being created."
    The error log information :
    Source : Browser Event ID: 8032
    "The browser service has failed to retrieve the backup list too many times on transport \Device\NetBT_Tcpip_{611A64A2-8F4B-409E-9AB2-0D9BF741E791}. The backup browser is stopping.
    The 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 {
    protected JSObject win = null;
    private JFrame frame = null;
    private boolean alreadyClosed = false;
    public void init(){
    this.win = JSObject.getWindow(this);
    frame = new JFrame("Test Frame");
    frame.setSize(300, 400);
    frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.out.println("windowClosing");
    TestApplet.this.stop();
    frame.show();
    public void stop() {
    if (!alreadyClosed) {
    alreadyClosed = true;
    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();
    }If any one know solution regarding how to aviod this crash of browser please let me know. I will be very thankful to you.
    Thanks.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

  • Trigger Javascript when closing browser window from CP8

    I worry this isn't possible but here goes....any help would be incredible.
    Recently I was given some great advice on how to trigger a Javascript action in the frame on our LMS which the Captivate file plays in.
    It works perfectly and on the final page triggers the Javascript which send usage back to the LMS and forward the user to a page which allows them to rate the course.
    The code was as follows:
    top.code.closeSCOContent();
    closeSCOContent() is something written into our LMS.
    However the obvious issue occurs when a user just closes the browser window and for some reason our LMS doesn't record any bookmarking or any data.
    The only way it seems to do this is if that function is called.
    So using the window.onunload() or the DOFinish; function is there a way I can edit any file in the Captivate output to trigger this function when closing the browser?
    Long shot I know but currently the best I have managed is getting the course to trigger this as soon as it loads rather than closing the window?
    Massive thanks in advance for any advice.

    Any solution to ensure the data is written back to the LMS would solve the issue.
    Currently when the close button is pressed nothing happens at all and it's a big problem.
    Triggering this .closeSCOContent() function would be the ideal, but if it's not possible anything to write back would be best.
    When you say <body onbeforeunload="top.code.closeSCOContent();">
    Do you mean putting this in the HTML file of the output which currently is:
    <body bgcolor="#f2f2f2">
    and change this to:
    <body onbeforeunload="top.code.closeSCOContent();" body bgcolor="#f2f2f2">

  • Prompting users for confimation when closing browser window

    Hi All,
    I would like to prompt the user with a popup-screen asking for confirmation that he wants to close the browser when hitting the browser-close ('X') button. Is this possible ?
    If the user chose to cancel the browser window shoud remain open, with all content as it was... and of course if he chooses to continue the window should just close.
    the WDA app is straight forward, and not running inside the portal.
    Thanx in advance
    -Tonni

    Hi Tonni,
    I thought I should add - the portal does implement a work protection mode that does allow you to prompt users if they navigate away from your page - and one of the best ways to implement that is through the FPM and its work protect mode interface.
    However, that still doesn't help, I'm afraid, in the case where you're trying to stop the user closing the browser window...
    I should also point out that some browsers do indeed produce an event which can be trapped on close of the window, and have been hugely exploited by website designers - to the extent that later/better versions no longer support it. Remember the web pages that when you closed spawned 3 more, and those 3 more etc. etc.
    Cheers,
    Chris
    edit:  also worth pointing out that the "Close" button provided within a portal session by the FPM is a form of navigation and can be trapped. Likewise any internal navigation button that perform the same sort of thing within your app.
    Edited by: Chris Paine on Mar 29, 2010 3:08 PM

  • Message Handling WDA and another Browser Window

    Hello,
    We have one Web Dynpro Application (ABAP) and this application will be run in a portal (NetWeaver 2004 s). We would like to start one JavaScript application from this WDA. This application started on click (UI-Element "LinkToURL"). We need the status of the started JavaScript application in the Web Dynpro Application. The important status are, error, exit, successful, browser window closed, ... .
    How we can implement a message handing with WDA and JavaScript.
    Thanks for your creative suggestion.

    Hi Andrea.
    I am not sure if this is what you are looking for:
    http://help.sap.com/saphelp_nw04/helpdata/en/82/04b340be3dff5fe10000000a155106/content.htm
    Seems that there is a JavaScript Library for Portal.
    In WebDynpro events are triggered as described here:
    http://help.sap.com/saphelp_nw04s/helpdata/en/da/f96f4132f15c58e10000000a1550b0/frameset.htm
    Cheers,
    Sascha

  • Closing browser window when form is closed

     

    Thanks, Michael.  I agree about exit_form.
    I want the second browser to block the first set of forms running in the first browser because it's a dataflow requirement - user goes from Form A to Form B, must complete their work in Form B before returning to Form A.  So I'm actually happy that webutil_host.host freezes Form A.  I don't want to use non-blocking because this would let the user back in Form A before they were done with Form B (and would potentially leave a lot of browser windows open).  I did initally try web.show_document but that was non-blocking.
    Normally, I would use a call_form in this scenario, but I have to log into a second database (for security reasons) for the user to complete their task in Form B, and if I use a call_form and then want to log into a second database, I have to log out of my first one (which causes me to lose all sorts of global variables and session variables), log into the second, and then log back into the first (and I don't get my globals or session variables back in that case).  So, I am keeping Session 1 alive in Form A, calling Form B and starting Session 2 against a second database, and then closing Session 2 and Form B and returning to Session1 (which is still open)and Form A.  Is there is a better way to do thise, please let me know.  (Mind you, this all worked very well in client/server mode - funny how the older tools can be more straightforward.)
    And yes, I agree that we are using an old OAS (OAS10gR1).  I have been suggesting an upgrade but am being told that it would require too much effort.  We have 200 forms and upgrading them to work with the newer OAS is something I have been told we cannot do.  If it doesn't require a forms upgrade (beyond open in new builder, save, and close), then I might have some luck making it happen, but everyone seems to think it does require more work than that.  If that is not true, please let me know.  I think that would solve a lot of our problems.
    Meredith

  • Closing browser window with Javascript

    In our Forms application, we have been using a line of Javascript in POST-FORM to close the browser window after the form is closed. After installing Windows XP SP2, this no longer works and my understanding is that putting the code in a standalone HTML file, and calling this file from POST-FORM will work.
    1. Where does this HTML file reside? My guess is
    {ORACLE_HOME}\forms90\server
    2. How is this script invoked? I guessed it would be
    WEB.SHOW_DOCUMENT('close.html').
    I'm clearly wrong, as this does not work!
    Many thanks in advance.

    You might also want to look at the following thread:
    Re: IE message "The web page you are viewing is trying...
    It refers to the addition of some JAVASCRIPT to your formsweb.cfg file which resolves the problem of the IE message "The web page you are viewing is trying..." from being displayed. It still may not work if you are running seperateFrame=True though, I have detailed the problem I'm experiencing in the associated thread.
    I'd be interested to hear if you can get round the display of the message if you are running in a separate frame.
    Richard

  • I click on a link or start typing text in a box on a webpage, any page, and the browser window either randomly changes size, reduces & goes to the toolbar, or some other strange random thing occurs. Why is this?

    Whenever I am using Firefox, when I am on a webpage (any webpage) & I either click on a link in that page, start typing in a box, click on a button, or click on a tab, the browser window either reduces to the toolbar, or just changes size, usually from full-screen to 2/3 of its size. I reinstalled Firefox (downloaded from the web) after wiping my hard drive because I was having so many problems from my browser constantly crashing, to the computer itself crashing often, to the computer running exceptionally slow. At first everything seemed fine. But then after having opened my computer a few times, a few different windows began to freeze, then that stopped, then this thing with the browser started a few times later after opening it. Now it does it every time I open it. Also, whenever I try to click on a button on other windows on my computer, I get the 'warning' sound, nothing happens, then after a couple more tries, the button works. All of this is just weird. I had antivirus protection on my computer, but it apparently did not catch whatever virus infected my computer, or the damage was already done when it did get it. I thought once the hard drive was wiped, that everything would be ok, but then these weird things began to start up, and now I am wondering.... Of course, it could also be something wrong with the browser, too. I've also had some trouble getting my printer to working again, but I've managed to solve that problem.

    I have had a similar problem with my system. I just recently (within a week of this post) built a brand new desktop. I installed Windows 7 64-bit Home and had a clean install, no problems. Using IE downloaded an anti-virus program, and then, because it was the latest version, downloaded and installed Firefox 4.0. As I began to search the internet for other programs to install after about maybe 10-15 minutes my computer crashes. Blank screen (yet monitor was still receiving a signal from computer) and completely frozen (couldn't even change the caps and num lock on keyboard). I thought I perhaps forgot to reboot after an update so I did a manual reboot and it started up fine.
    When ever I got on the internet (still using firefox) it would crash after anywhere between 5-15 minutes. Since I've had good experience with FF in the past I thought it must be either the drivers or a hardware problem. So in-between crashes I updated all the drivers. Still had the same problem. Took the computer to a friend who knows more about computers than I do, made sure all the drivers were updated, same problem. We thought that it might be a hardware problem (bad video card, chipset, overheating issues, etc.), but after my friend played around with my computer for a day he found that when he didn't start FF at all it worked fine, even after watching a movie, or going through a playlist on Youtube.
    At the time of this posting I'm going to try to uninstall FF 4.0 and download and install FF 3.6.16 which is currently on my laptop and works like a dream. Hopefully that will do the trick, because I love using FF and would hate to have to switch to another browser. Hopefully Mozilla will work out the kinks with FF 4 so I can continue to use it.
    I apologize for the lengthy post. Any feedback would be appreciated, but is not necessary. I will try and post back after I try FF 3.16.6.

  • I've been using FCP 7 on my iMac for quite some time with great success.  Lately I created a new project and the browser window does not format properly (it's O.K. for previously created projects). The effects window is also not displaying properly.

    Help! My browser window is suddenly not formatting properly. (losing browser formatting, glitch, bug)  I'm using FCP 7 on an iMac with OS X 10.8.5 and have been successfully doing so for a couple of years.  I fear my Final Cut Pro is corrupt and I have to re-install. Anyone ever see this problem? Old projects display and behave fine in the browser, but any new project I create, totally loses the formatting in the browser and the browser also does not display the "effects" window properly anymore. (see below)

    YOU ARE A LIFE SAVER!  I reinstalled the program and everything. THANK YOU! THANK YOU! MY HERO!!!

  • Closing browser window from an Applet?

    I've written a series of applets that perform different functions. I placed a button on each applet with the purpose to close the window in which that applet is running. However I don't even know where to start looking to find out how to make my applet close it's own browser window. I know how to open a new browser window from an applet but not vice versa.
    Can anyone help please?
    Mark.

    Right, I sort of tracked down some code that uses getMethods to allow me to invoke a Javascript command. It is not pretty and took a little bit of editing to get to work but it does the job without putting JS stuff into my HTML.
    However it is causing some problems. If I open one of my other applets it will only let me close that window and the previous applets ceases to respond at all. I think this may be because the invoke gets the JSObject which is the window and somehow having more than one applet open in different windows is causing it to get confused and is locking the first window and only responding to the second.
    I have seen a much simpler method that uses:
    import netscape.javascript.*;
    and JSObject to get the window but my compiler complains about the import. Any further suggestions or an example would be welcome as my current solution is a bit limited as you can effectively only have one window open at a time which doesn't suit my needs.
    Many thanks.
    Mark.

Maybe you are looking for