Window.close() problem

What I want is to close a browser window. but when I use window.close() A dialog box pop's up saying Are u sure u want to close the window.
Now I don't want this dialog box to appear.
Help!!!

Cross-post:
http://forum.java.sun.com/thread.jsp?forum=33&thread=480610&start=0&range=15#2239454
MOD

Similar Messages

  • Model window close problem ?

    Hi experts,
    I tried to close a modal window colse bar at top right of window but it is not closed. Can anybody tell how to close that.

    Hai,
    try,
         IF :SYSTEM.EVENT_WINDOW = '<modal_window_name>' THEN
              HIDE_WINDOW('<modal_window_name>');
              GO_ITEM('<other_window_name>.<item_name>');
         END IF;Regards,
    Manu.
    If this answer is helpful or correct, please mark it. Thanks.

  • Problem with window.close and window.open

    I am having two suspected Actionscript problems which only seem to be happening with Flash player 9 and later.
    BACKGROUND:
    I have a client who needs browser-launched swf files to play from a CD-ROM (I do not want to use the Flash projector).  These files were created a few years ago using Actionscript 1 & 2 code and everything has worked perfectly until now.
    Here is the setup:
    First, an autorun file on the root of the CD runs and writes a 'trust file' to the 'Macromed' directory.  The autorun next launches 'index.htm' which is simply an html page containing a series of links (topic1.htm; topic2.htm; and so on). Next, let's assume the student clicks the 'topic1.htm' link from the 'index.htm' page.  The 'topic1.htm' link launches a web page (also located on the CD) which contains and displays 'topic1.swf'.  So far, everything works fine.
    Here is where the two problems happen.
    Problem 1:
    I have an 'Exit' button within each swf (remember each swf is contained inside an html page).  The 'Exit' button has always worked properly, but suddenly does not work in Flash player 9.  I am using the following Actionscript 2 code on the 'Exit' button:
    on (release) {
    getURL("javascript:window.close()");
    The 'Exit' button has always worked using this code (and still works in Flash player 8 and lower).  However, it does nothing when played using Flash player 9.
    Problem 2:
    There are links to html popup windows within the 'topic1.swf' file (remember 'topic1.swf' is contained inside 'topic1.htm').  Each popup window contains a swf file that is used to present a demonstration.  When the student clicks the 'demo1.htm' link from 'topic1.swf', an html popup window SHOULD load and display 'demo1.swf' inside the 'demo1.htm' window.  The main ('topic1.htm') window stays open so that the student can return to the topic after completing the demo.  This has always worked properly until Flash player 9.  Here is the Actionscript 2 code
    which I am using on the button inside 'topic1.swf' to launch 'demo1.htm':
    on (release) {
                getURL("javascript:launchWin2('webpage2.html');");
    ADDITIONAL INFO:
    'topic1.htm' contains the following code which is used to support the Actionscript code listed under 'Problem 2' above.
    <SCRIPT LANGUAGE=JavaScript>
    <!--
    var padvar="";
    var childwind;
    function launchWin2(arg) {
    openWin2(arg);
    function openWin2(arg) {
    childwind = window.open(arg,"padwind2","menubar=no,location=no,status=no,scrollbars=no,width=750px,he ight=500px,left=0,top=0");
    //-->
    </SCRIPT>
    I would appreciate any help anyone can offer.  I am wondering if the problem has to do with a need to use ONLY Actionscript 3 code from Flash player 9 onwards.
    Thanks!
    Terry

    You may have '''Switched ON Caret Browsing'''. press '''F7 (on Mac: fn + F7)''' to toggle '''Caret Browsing ON/OFF'''
    * click '''Firefox''' button and click '''Options''' -> Advanced -> General -> remove
    Checkmark from '''Always use the cursor keys to navigate within pages'''
    * http://kb.mozillazine.org/Scrolling_with_arrow_keys_no_longer_works
    * http://kb.mozillazine.org/Accessibility_features_of_Firefox
    Check and tell if its working.

  • Problems using window.close() and setting fields

    Hi,
    I have two problems:
    First one is:
    I created a simple JSP with 'Save' and 'Exit' Buttons. In the Exit button on click event I invoked a function closeWindow, which calls teh window.close(). But on clicking Exit, the window does not close. Can anyone please tell me why.
    Second one is:
    The JSP also needs to get loaded with some values in the Textfields. Theses values are extracted from a text field using a Java class. I am able to see that these values are extracted from the text file and are loaded into Java vars, but when I am trying to set this value into a text field, it is NOT getting set.
    (filePathDetails is the instance of the class that extracts the text values)
    The entire code is posted below:
    <%@ page language="java" import="ftpScheduler.*" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <% FolderPathInfo filePathDetails = new FolderPathInfo(); %>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>PATH DETAILS</title>
        <SCRIPT type="text/javascript">
         function setPaths(){
              with(document.pathDetails){
                   textAncPath1.value = <%=filePathDetails.localDirPath1 %>;
                   textAncPath2.value = <%=filePathDetails.localDirPath2 %>;
                   textArchivePath.value = <%=filePathDetails.archiveDirPath %>;
                   textLogPath.value = <%=filePathDetails.logFilePath %>;
         function closeWindow(){
              window.closeWindow();
        </SCRIPT>
    </head>
    <body bgcolor="#c0c0c0" onload="setPaths()">
         <FORM name="pathDetails" method="get" action="DetailsServlet.java">
         <FONT face="Arial" size="3"><STRONG>Directory Paths:</STRONG></FONT>
           <BR><BR>
           <TABLE border="0" cellspacing="" height="60" width="450"
                                                        style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align="center">
           <COLGROUP>
           <COL width="45%">
           <COL width="55%">
           </COLGROUP>
           <TR>
           <TD><LABEL>Ancillary Transmit Path1 :</LABEL></TD>
           <TD><INPUT type="text" name="textAncPath1" width="290" maxlength="350"/></TD>
           </TR>
           <TR>
           <TD><LABEL>Ancillary Transmit Path2 :</LABEL></TD>
           <TD><INPUT type="text" name="textAncPath2" width="290" maxlength="350"/></TD>
           </TR>
           <TR>
           <TD><LABEL>Archive Path :</LABEL></TD>
           <TD><INPUT type="text" name="textArchivePath" width="290" maxlength="350"/></TD>
           </TR>
           <TR>
           <TD><LABEL>Log File Path :</LABEL></TD>
           <TD><INPUT type="text" name="textLogPath" width="290" maxlength="350"/></TD>
           </TR>
           </TABLE>
           <P align="center">
              <INPUT type="submit" name="buttonSave" value="Save">
              <INPUT type="button" name="buttonExit" value=" Exit " onclick="closeWindow()">
              <BR>
           </P>
           </FORM>
    </body>
    </html>Please help me.
    Thanks in advance.

    Try the following..
    For problem 1:
    Use window.close() instead of window.closeWindow().
    For the second problem
    don't call the function setPaths() at onload. Rather
    call the function after the page is loaded. You can
    try like this.
    If it doesn't work then check whether the browser is
    giving any JavaScript error message.
    <SCRIPT type="text/javascript">
    setPaths() ;
         function setPaths(){
         alert(document.pathDetails.element[0].value);
    document.pathDetails.element[0].value =
    = <%=filePathDetails.localDirPath1 %>;
              alert(document.pathDetails.element[0].value);
              with(document.pathDetails){
    textAncPath1.value =
    e = <%=filePathDetails.localDirPath1 %>;
    textAncPath2.value =
    e = <%=filePathDetails.localDirPath2 %>;
    textArchivePath.value =
    e = <%=filePathDetails.archiveDirPath %>;
    textLogPath.value = <%=filePathDetails.logFilePath
    ath %>;
         function closeWindow(){
              window.closeWindow();
    </SCRIPT>Hi,
    Actually I did try window.close(), but I still am not able to close the current window.
    And as for the problem of setting up the field values, sorry the given solution doesnt seem to work. :-(..
    I have pasted the entire code, I dont know where teh flaw is. Please review the same and let me know.
    Your help is very much appreciated.
    <%@ page language="java" import="ftpScheduler.*" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%>
    <% FolderPathInfo filePathDetails = new FolderPathInfo();%>
    <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>PATH DETAILS</title>
         <SCRIPT type="text/javascript">
         function setPaths(){
              document.pathDetails.textAncPath1.value = "Anything";
              with(document.pathDetails){
                   textAncPath1.value = <%=filePathDetails.localDirPath1%>;
                   textAncPath2.value = <%=filePathDetails.localDirPath2%>;
                   textArchivePath.value = <%=filePathDetails.archiveDirPath%>;
                   textLogPath.value = <%=filePathDetails.logFilePath%>;
         function exitWindow(){
              window.close();
        </SCRIPT>
    </head>
    <body bgcolor="#c0c0c0">
         <FORM name="pathDetails" method="get" action="/FTPSchedulerApp/ftpScheduler/DetailsServlet.java">
         <FONT face="Arial" size="3"><STRONG>Directory Paths:</STRONG></FONT>
           <BR><BR>
           <TABLE name="tempTable" border="0" cellspacing="" height="60" width="450" style="FONT-SIZE: 10pt; FONT-FAMILY: Arial" align="center">
           <COLGROUP>
           <COL width="45%">
           <COL width="55%">
           </COLGROUP>
           <TR>
           <TD><LABEL>Ancillary Transmit Path1 :</LABEL></TD>
           <TD><INPUT type="text" name="textAncPath1" width="290" maxlength="350"/></TD>
           </TR>
           <TR>
           <TD><LABEL>Ancillary Transmit Path2 :</LABEL></TD>
           <TD><INPUT type="text" name="textAncPath2" width="290" maxlength="350"/></TD>
           </TR>
           <TR>
           <TD><LABEL>Archive Path :</LABEL></TD>
           <TD><INPUT type="text" name="textArchivePath" width="290" maxlength="350"/></TD>
           </TR>
           <TR>
           <TD><LABEL>Log File Path :</LABEL></TD>
           <TD><INPUT type="text" name="textLogPath" width="290" maxlength="350"/></TD>
           </TR>
           </TABLE>
           <div align="center">
              <INPUT type="submit" name="buttonSave" value="Save"/>
              <input type="reset" name="buttonReset" value="Reset" onclick="setPaths()"/>
              <button name="buttonExit" onclick="exitWindow()"> Exit </button>
              <BR>
           </div>
           </FORM>
    </body>
    </html>

  • Why won't Firefox 4 on Mac OSX 10.6.7 quit when QUIT is selected? The window closes, but the application remains open necessitating a forced-quit. Until recently it worked fine. I've reinstalled Firefox but the problem persists.

    Firefox 4 on Mac OSX 10.6.7 won't quit when QUIT is selected.
    The window closes, but the application remains open necessitating a forced-quit. Until recently it worked fine. I've Downloaded Firefox again and reinstalled but the problem persists.

    Perform the suggestions mentioned in the following articles:
    * [[Firefox is already running but is not responding]]
    -> Profile in use
    * [http://kb.mozillazine.org/Profile_in_use]
    Check and tell if its working.

  • Problem creating playlists library window closes when opening new playlist

    library window closes when opening new playlist impossible to drag and drop songs from lib to new playlist

    Hi
    You don't need to open a playlist to drag and drop from your library. Just open the library and drag the selected item or items to the NAME of the chosen playlist (in blue bars on the lower left) and just drop it there. When you hold the items over the playlist name, it will show you a little green dot with a plus sign in it and the number or items being dropped. Then when you are done dragging and dropping you can open the playlist and see that the items were added. Hope this makes sense.
    Good luck!

  • Problem with window.close() and print preview in IE

    Hi all,
    In IE, when window.close() or self.close() is executed, the window is closing perfectly. But when after opening a print preview window from file menu in IE and after closing the print preview with [X] button, then the window.close() is not working. Is there any solution to close the window even after closing the print preview window? here is the sample code.
    1) Close.htm
    <HTML>
    <TITLE>TEST</TITLE>
    <BODY>
    <SCRIPT LANGUAGE="javascript">
    function CloseMe()
    window.close();
    //self.close();
    </SCRIPT>
    <INPUT TYPE="button" ONCLICK="CloseMe()" VALUE="Close Me">
    </BODY>
    </HTML>
    Thanks,

    masijade. wrote:
    nogoodatcoding wrote:
    Crosspost: http://forum.java.sun.com/thread.jspa?threadID=5227849&tstart=0
    Why'd you start a new thread once you got an answer on the thread linked above ( and even acknowledged it ) about the fact a that it was not a Java query?Because last time it was a JSP forum, which is not JavaScript obviously, but this is a Java forum, and the designers, obviously, simply neglected to include Script in the name, of course. ;-):D Why, oh, why did they have to call it JavaScript! (And before someone starts, that was a rhetorical question!)

  • IPad Safari IOS 5 window.close() closing wrong window

    When I want to close the child window(although now they open as tabs) in the parent window with javascript window.close(),the parent window was closed.
    Is this a bug or have any solution?
    Safari/7534.48.3
    My script:
    <script type="text/javascript">
      var subWin1 = null;
      function popSub() {
        subWin = window.open('myurl,'subWin1','height=200,width=200'); 
      function closeSub() {
        subWin.close();
    </script>

    I'm having the exact same problem.  On iPad Safari on iOS 5 attempting to close a popup window with close() is causing the parent window to close instead.  Every other browser, including iPhone Safari on iOS 5 it works fine.  I've been trying to come up with a workaround but haven't found anything yet.  If anyone can find a workaround please post.

  • When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs..

    When closing Firefox windows, I would like a warning before the last window closes. The about:config settings do nothing. There is a warning for multiple tabs... why not for the last window? I do not use tabs... just windows... I have a mouse button programmed for that. It is really irritating to have to restart Firefox all the time and then open the history window because no warning was issued!

    This is ridiculous. I've had this problems for years now and I'm finally walking away from Firefox. I use my keyboards more than my mouse, and how many times does your finger slip and hit Command Q instead of W. How come FF can't reset something as trivial as this? So many people are having problems with this?
    Feels like FF has become too big, too slow and just not cooperative anymore. What a shame, I've been using Netscape/Firefox for 13 years. This is silly.

  • My dad has a brand new iMac. If he quits an app, this window closes, but the app won't finish shutting down, Force quitting does not work.  Once another app is opened, it will not close either.  Now none of the apps are responding. Any ideas?

    My dad has a brand new iMac. If he quits an app, this window closes, but the app won't finish shutting down, Force quitting does not work.  Once another app is opened, it will not close either.  Now none of the apps on the dock are responding. I asked him to click on the apple, and drop down to "About this Mac", but that wouldn't open either. Any ideas?  If I was at his house, I would call Apple Care in a heartbeat, but am home with my sick daughter,,,  Thanks!

    For starters, have him open Disk Utility in Applications>Utilities, select the volume (the indented listing) and Verify Disk. If it reports any problems, have him try a Safe Boot by holding the Shift key at startup. This boot will take much longer than usual. It's checking and trying to repair the drive directory, if possible. Once in Safe Boot, have him repair Permissions.
    For other Disk repair remedies see
    http://support.apple.com/kb/TS1417
    Also, have him try a PRAM Reset. At the startup chime, hold down CMD-Option-P-R together, listen for two more chimes, total three, then let go to finish booting.
    Also, is he running any AV? If so, have him uninstall it. It might be responsible for this behavior. (There are no viruses for OS X.)

  • ITunes Match Step 3 doesn't load,  Windows Closes iTunes.  Solution?

    Since October 27, 2013 have not been able to get all 3 steps of the iTunes Match to complete.  Steps 1 & 2 load correctly and a green check mark appears for each.  However, when things move to Step 3 an error message immediately appears that indicates "iTunes has stopped working", and Windows closes iTunes. 
    My laptop is running Window 7.  Apple Tech Support had me uninstall all components of iTunes and then (re)load the latest version on my laptop.  All music in my iTunes library has always played correctly on my iPod Classic.  (Note: the iPod Classic has not been synced sinced the problems with the iTunes Match load surfaced as I am fearful of corrupting what's there.  Which also means all recent iTunes store purchases cannot be played on the iPod classic until it sync'd.)  Accessing the iTunes music library on the iPod Touch shows that some tracks are greyed out and not available which seems consistent with the failure of Step 3 to load.  Need help.  Thanks.

    Hi,
    Try holding shift key whilst turning off match. This will clear genius / match cache. Close iTunes then reopen. Turn on match, you will be asked to add this computer, do so and let process complete.
    You should also add iCloud status column to song view - menu > view > view options and tick box. This will tell you what has been matched, uploaded, purchased, duplicate or inelligible. It will show tracks that have not been processed  as "waiting". If you have any such tracks, one or more may be preventing completion. You may need to remove such tracks and gradually readd until match processes them. This may help identify problem tracks.
    Jim

  • Window.opener problem in javascript

    Hi,
    I'm using a code for opening a clild window from the parent window. The child window contains some <input type="file"> elements. After setting the values of these file elements I'm closing the child window. But before closing I want to set the values of file elements to the file elements on my parent window.
    The code I'm using is as follows:
    "parent.jsp"
    =========
    function createWindow() {
    window.open("child.jsp");
    return false;
    <form method="post" action="display.jsp" enctype="multipart/form-data">
    <input type="button" value="Add Attachments" onClick="return createWindow()"><br>
    <input type="file" name="file1"><br>
    <input type="file" name="file2"><br>
    <input type="file" name="file3"><br>
    <input type="submit" value="Submit Form"><br>
    </center>
    </form>
    "child.jsp"
    ========
    function returnToMainWindow() {
    window.opener.document.forms[0].file1.value = document.forms[0].filex.value;
    window.close();
    <form method="post">
    <center>
    <input type="file" name="filex"><br>
    <input type="file" name="filey"><br>
    <input type="file" name="filez"><br>
    <input type="button" onClick="returnToMainWindow()" value="Done">
    </center>
    </form> The problem is when I'm setting the values of file control of child window to the file control of parent window using window.opener, it's unable to set up the values. Can someone rectify the problem in the code.

    It is impossible to set the value of the file input thing. But if they realy want it in a popup, then you can try something like this:
    -1. Put the attatchement list in a iframe
    0. Open the parent file with some with somewhere a unique id (like a session id or something
    1. Open your child page in a popup, give that uniqueid as parameter ("like child.jsp?id=<uniqueId>")
    2. Use regular file input things in that popup, and replace the 'close' button by a submit button
    3. Track the submit of the form, show a 'now uploading to server, please wait' message
    4. The child page sends the attatchements to the server, stored in a tempory folder named <uniqueId> (store it in the form as a hidden input thing)
    5. When the upload is ready, display some message 'files uploaded, close this window to return to your mail'.
    6. When the user clicks that 'close' button, close the popup and then reload the attachment-frame
    7. The attachment-frame just lists the files stored in that <sessionid> folder, and it seems like the user has added those files to it
    If you want i can create an example of it
    koentjepoppe
    note: if you add the date to that unique id, you know when that folder is created and then you know wich folders you have to delete if the user aborts his mail for example (then those files are still in that folder wasting space)

  • Print Templates print preview window closes unexpectly when printing document

    This is a cross posting from Internet Explorer Web Development after a suggestion that this forum would be a better location. See
    https://social.msdn.microsoft.com/Forums/ie/en-US/351e1245-b606-4467-9f3c-1c72f9cdf9ea/print-templates-print-preview-window-closes-unexpectly-when-printing-document?forum=iewebdevelopment.
    I have raised an issue through Connect for this:
    https://connect.microsoft.com/IE/feedback/details/1134168/ie9-to-ie11-print-templates-print-preview-window-closes-unexpectly-when-printing-document, but I would like some more visibility of the issue as my customers thought my application was closing when
    they printed a document.  I also don't know if an issue in Connect gets any priority support via MSDN, but this forum does.
    This looks to me like a problem in the IE Print Templates startDoc API call, but if there is a more appropriate forum to raise this issue in please let me know.
    In the application where I use print templates, the window closing is not in it self a problem because the Javascript that is calling startDoc also closes the Print Preview window when the print is finished.
    The fact that the application looses focus and can be hidden by the windows of other applications when the Print Preview window is closed by startDoc is the issue noticed by our customers, so I need a fix preferably, or a work around at a pinch.
    Details of the issue reproduced below.
    When using IE Print Templates, the startDoc function is causing the print preview window to close.  This behaviour started with IE9, and is still present with IE11.
    When an application is using print templates (see
    https://msdn.microsoft.com/en-us/library/aa753279(v=vs.85).aspx) for print functionality, this has the effect of causing the application to become hidden by any other application window once printing from the print preview window has started.  It is
    actually this behaviour that started me looking at this issue as the users thought the hosting application had closed.
    Print Templates are not accessible by using IE as a web browser, but only when using the WebBrowser Control to embed IE in an application.  The reference for this feature is available from this url:https://msdn.microsoft.com/en-us/library/aa753279(v=vs.85).aspx
    and a sample Microsoft application that demonstrates the use of Print Templates can be used to demonstrate the problem (required for the reproduction steps).  The application is available via this article and searching for "download spiffy".
    Steps to reproduce the problem:
    To see the full effect of the issue, first ensure there is a window from another application (like Windows Explorer) that will cover the sample applications window if brought to the foreground (making the Windows Explorer window full screen works).
    Start the sample application (and ensure that the full screen Window Explorer is the next application to activate).
    Then in the drop down box in the top right corner of the UI select Template8.htm.
    Click the Print Preview button that is just below the drop down box (this will open a new Print Preview window).
    In the new window click the Print… button (this will open a Print dialog).
    Click the Print button at the bottom of the Print dialog.
    The Print dialog closes (expected) and then the Print Preview window also closes (not expected), however the document is still printed successfully.
    When the Print Preview windows is closed unexpectedly, the Windows Explorer window is brought to the foreground (obscuring the sample applications window).
    If you reselect the sample application and click the Print Preview button again, the Print Preview dialog is not displayed unless you restart the application (this looks to be a symptom of the same issue, not a separate problem).
    To see that the Print Preview window appears to be closed by the startDoc call, use the resource editor in Visual Studio (the exe can be opened directly by File | Open | File…) to edit the HTML resource "TEMPLATE8.HTM" (I found I needed to delete
    it and add it back in for the change to stick), find the startDoc call and add two alerts, one on the line before and one on the line after.  When IE is accessing the template, it is being done using the name of the executable (so do not rename the modified
    version of printtemplates.exe, make the changes to a copy in a different directory if you don't want to change the original).  Start the modified version of the application and follow the same steps as in the reproduction.  This time, after clicking
    the Print button in the Print dialog, the dialog will close, the first alert will pop up, then the Print Preview window will close, then
    the second alert will pop up.
    Thank you,
    Warren.

    Hi Shu,
    I have noticed that the print templates API is listed as part of the Legacy APIs. 
    Is this just because it hasn't changed or is not new?  Or does this mean that it is no longer maintained and may be removed (or at least deprecated) at some point in the future? 
    It would good to know if we should start planning for the implementation of a different method of printing.
    I understand that the sample application is no longer maintained, but I also think that the Print Template API that it uses has not changed, and so should still work (and it does mostly).
    If the Print Preview window was being closed as a result of using the Print dialog (and if it had behaved the same way with IE8) I would be willing to go with the by design argument.  
    I have found that the Print Preview window is not closed until startDoc is called, and it closes before control is returned from the startDoc function. 
    Just as part of investigating and try to find a workaround, if I call window.close(), any alert calls made no longer display the alert window after the close call. 
    Alert still functions after startDoc has closed the window however. 
    The is not the sort of consistent behaviour I would expect from something that is by design. 
    Also while investigating, I found that calling startDoc after calling window.close() results in an exception with the error code -2147467259 (0x80004005), this is probably quite normal and expected, but does indicate that the Web Browser Control should
    not be closed till after printing.
    I had found that old thread, and I had concluded it was the same issue, but it was also aimed at different aspect of the problem (which I see in the sample application, but not my application). 
    The visible issue I have is that my users think the application has been closed because after clicking print (on the Print dialog) the application gets hidden by other windows from other applications. 
    This aspect affects the sample in the same manner and so it was a convenient way to demonstrate the problem.
    If IE connect do not look at this issue any time soon, do I have any other avenues to resolve this issue?
    Thank you,
    Warren.

  • Window.open problem

    Good Morning,
    I am having problems with the window.open() syntax. My application has 14 pages and is in 3.2. I need the whole application open in a new browser window. I have tested the code with a blank screen on page 101 and it opens correctly. When I put in the actual URL, the window will open multiple windows, where I have to go into task manager and end all processes. Will I have have this code on each page?
    Code below:
    header
    function fullscreen_fun()
    window.opener=self;
    window.open=("f?p=&APP_ID.:101:&SESSION.","","height=350,width=350");
    window.close;
    </script>
    onload="javascript:fullscreen_fun()"I need the entire application open in a new browser window.
    Thanks,
    Mary

    I'm assuming you're talking about Solution 1 in that blog post. The reason that he opens the application's window from a temporary HTML page is to avoid the exact problem that you described initially. By having that code within your application, you're opening a new window to your application which then opens a new window to your application which then opens a new window to your application, etc. etc. Using Solution 1, you'd define a HTML page which opens a new full-screen window to your application, then the HTML page closes itself. You give only the URL to the HTML page to your users.
    If you don't want to use an intermediary temporary page, then Solution 3 is probably the next best - at least it doesn't rely on IE-only. It's simply telling the browser window to resize itself.
    I haven't tested these so I can't speak to any of their applicability. I strictly avoid tinkering with browser behavior via code anyway - it always, always, always leads to trouble. My only recommendation on that besides "don't do it" is to comment liberally, because I guarantee you'll be back in that code someday.
    But please, take a look at the database design too. Nothing you're attempting to do here is going to stop incomplete transactions from being created - only a good database design with solid referential integrity and constraints is going to do that.
    Hope this helps,
    John
    If you find this information useful, please mark the post "helpful" or "correct" so that others may benefit as well.*

  • Scheduled job does not stop even after the scheduling window closes

    We have written custom stats gathering job whose duration has been set as 14 hours in the schedule. This job starts daily at 6:00 PM and expected to complete upto 8:00 AM next day. But the problem is that this job continues to execute even after 14 hours. If we look at the dba_scheduler_job_run_details table, then its execution duration is about 16 - 19 hours daily. We could not understand as why it is not closed when scheduling window closes? Is there any problem with the scheduler configuration?
    select job_name
          ,program_name
          ,schedule_name
          ,schedule_type
          ,stop_on_window_close
      from dba_scheduler_jobs
    where job_name = 'GATHER_STATS_STD_JOB';
    Output:
    JOB_NAME
    PROGRAM_NAME
    SCHEDULE_NAME
    SCHEDULE_TYPE
    STOP_ON_WINDOW_CLOSE
    GATHER_STATS_STD_JOB
    GATHER_STATS_STD_PROGRAM
    GATHER_STATS_STD_SCHEDULE
    NAMED
    TRUE
    SELECT window_name
          ,schedule_owner
          ,schedule_name
          ,schedule_type
          ,start_date
          ,repeat_interval
          ,end_date
          ,duration
          ,window_priority
          ,next_start_date
          ,last_start_date
          ,enabled
          ,active
      FROM dba_scheduler_windows;
    window_name
    schedule_owner
    schedule_name
    schedule_type
    start_date
    repeat_interval
    end_date
    duration
    window_priority
    next_start_date
    last_start_date
    enabled
    active
    GATHER_STATS_STD_WINDOW
    sys
    GATHER_STATS_STD_SCHEDULE
    named
    +00 14:00:00.000000
    high
    23-feb-15 06.00.10.000000 pm +02:00
    23-feb-15 06.00.10.095878 pm +02:00
    TRUE
    TRUE
    We are using Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod on Linux platform.
    Message was edited by: Moazzam

    Straight out of the docs 83 DBMS_SCHEDULER
    stop_on_window_close
    This attribute only applies if the schedule of a job is a window or a window group. Setting this attribute to TRUE implies that the job should be stopped once the associated window is closed. The job is stopped using the stop_job procedure with force set to FALSE.
    Having said that, stop_job with force applies to whether information about the job is gathered - you would have to test, but I believe that the statistics gather will be terminated in the middle of whatever it's doing.
    Update: force says:
    force
    If force is set to FALSE, the Scheduler tries to gracefully stop the job using an interrupt mechanism. This method gives control back to the slave process, which can update the status of the job in the job queue to stopped. If this fails, an error is returned.
    If force is set to TRUE, the Scheduler will immediately terminate the job slave. Oracle recommends that STOP_JOB with force set to TRUE be used only after a STOP_JOBwith force set to FALSE has failed.

Maybe you are looking for

  • Macbook Pro speed problems

    I just bought a MacBook Pro. I have always been a PC user and I have a number of notebooks curently but I really wanted to try a mac mainly for working with video. But in the three weeks since I bought it I'm shocked by how slow it is for simple thin

  • White spot when unlock with Touch ID

    When I unlock my iPhone 5s using touch ID there is white spot on the screen while unlock animation. If I enter password everything is ok.

  • Word cross platform incompatability

    This might not be the best place to post this question as it relates to Word... But my son is getting all sorts of grief working on my Mac, and then having to go off to his mum's place to use her PC, all because Word for Mac doesn't seem to have Page

  • Deprecated Status in GP

    Hi Everyone,         I am facing the Deprecated Status Problem,Once i got the deprecated status in GP i have select Toggle-Multiedit Mode or Toggle SingleeditMode,that time i got nullpoint exception like this.. The initial exception that caused the r

  • Route traffic

    Hi All, we have three sites at mumbai, pune , delhi. A site to site tunnel  is created between mumbai and pune. and tunnel between mumbai and delhi. We donot have tunnel between delhi and pune. Is it possible to route the traffic of delhi from mumbai