Window losing focus

Hi all,
I was wondering if it were at all possible for a JFrame or JWindow to listen for an event when the window is about to lose focus - ie it is losing focus (as opposed to lost focus).
WindowEvent and the subsequent WindowFocusListener interface only caters for handling a window having already lost or gained focus, however I need to make things happen before the window actually loses its focus.
Can anyone help?
Regards,
Andrew.

Hi Andrew,
I don't know a possibility to get an event like you want to have - and I do think such an eevnt does not exist.
But I do think you really wouldn't need such a possibility. Perhaps you can give a short explanation why you need this possibility. If the problem is to regain the focus there is a post from me a few minutes ago (I'm sorry about not knowing how to reference to other posts but I hope since years I will learn such things). If you have other problems please explain the problem - perhaps there is another way of solving it.
HTH and greetings from
Holger

Similar Messages

  • Problems with titler window losing focus

    I'm using PP2.0, running on windows XP x64. It's been running since it was last re-installed in December 2007 (after a problem with codecs that broke PP2), and I've made no changes to it or to any of the support processes it uses, nor any changes to the OS (apart from service packs). There have been NO driver changes, window layout changes, workspace changes, or any other changes (apart from entropy). The mouse I'm using is a [oxymoron]Kensington Expert Mouse Pro[/oxymoron], with their latest (i.e. 2007) drivers, and XMouse ver 1.37.0.0 (i.e. their latest x64 driver), but this happens regardless of the mouse or keyboard I use.
    To set the scene... I use a "standard" title template for all my video work, with predefined text fields and colours and so on. There's nothing bizarre or extraordinary about these templates, they're actually super simplistic in terms of what most users here use their titlers for! The entire title is completely static - there are no scrolling or moving anythings, the title is overlaid on black video, there are just a dozen simple text boxes and one standard logo (bmp format), that's it. I use only Arial fonts, with no special settings or kerning or spacing or anything more complex than colour. I haven't touched or modified the original titler template since I set it up in December 2008. The problem I'm seeing happens to any titles, not just the known working template, so it's definitely a PP2 problem, not a titler problem.
    The problem is that recently (in the past 3-4 months, over maybe 5 projects in that time) the titler window loses focus while I'm using it, and the PP2 main application becomes active.
    When I bring the titler window up (using any method) and start editing, that window loses focus (window frame reverts to the background windowframe colour) and I can't type or do anything else in the titler window.The PP2 app window suddenly become the active window, and remains active until I shut down the titler.
    My workaround is to click and hold in the titler window, on or around the text I want to edit. So by pressing and holding the left mouse button, I can insert text just fine in any existing text frame. And by selecting text with the left button and then holding it (like I'm starting a drag operation), I can _replace_ the selected text - but as soon as I release the mouse button, the focus leaves the titler and I can't do anything again.
    I've reset the workspace, changed mouse and keyboards, but the problem isn't a hardware or driver issue. PP2 is the only application that behaves like this, and it's the only Adobe application that behaves like this - Photoshop (5.5 and CS8) and Audition (1.5 and 3.0) all work perfectly normally.
    This behaviour occurs with titles I've used and saved in previous working projects, it happens with new blank titles, and so on.
    What I've noticed most recently while trying to fix the problem, is that sometimes I can actually type a couple of letters or hit an editing key or two in the titler window normally, but then the titler loses focus and keeps it lost permanently after that. That doesn't always happen, and it doesn't appear to be related to process flow. So restarting PP2, or closing and reloading a project, don't affect the arbitrary nature of the "sometimes starts to work" behaviour. I can sometimes re-edit a title in the same project after editing the title with the focus lost, and suddenly the first few keystrokes are normal, but then the focus reverts to the main app.
    If anyone has any ideas or suggestions to try (apart from reinstalling the application again or upgrading), I'd be most grateful.
    -PCPete

    I think you're right, it's starting to look like another problem within the "new" PP2 installation. It's such a complex app, it's not surprising it gets lost.
    Since this is the only app that has this problem (and because of the nature of the problem), I know it's not a graphics card or driver issue.
    This appears to be a high-level windows function problem, to do with the way the PP2 app is handling the modal form. It's probably not the mouse driver, since I don't move the mouse outside of the child window, but that doesn't leave much else. I don't have popups or any other asynchronous applications (like email warning windows or balloon-type reminders or notifications) either.
    I really don't want to go through the horror of yet another reinstall of an Adobe product if I can possibly avoid it, but pending no other useful ideas, that is an absolute last resort.

  • Window losing focus constantly.  Computer is unusable!!!!

    Help!  Ever since I upgraded to Mavericks, I have been having a problem where the window in any appllication that I am working in loses focus every few seconds.  I have read every forum I can find on the subject, but no one seems to have the answer to the problem.  The only thing that seems to work, but very unstable is launching my computer in safe mode.
    My brand new computer is unusable!!!!!!!!

    My brand new computer
    Apple>About This Mac>More Info>Service
    Please read the warranty paperwork that came w/your computer.
    You have 14 days to return the computer w/no questions asked. 
    You have 90 days of FREE phone tech support on top of your standard 1 year warranty unless you also purchased AppleCare which gives you an additional 2 years of coverage plus FREE phone support.
    Strongly suggest that you take FULL advantage of the above before it runs out.  Let Apple deal w/the problems.

  • Second window loses focus

    Hi all,
    I set up a navigation between two wd applications within the portal. The navigation will open a new window once the user clicks a button in the first application. The navigation itself works well, however, the new window is always shown behind the portal page, in other words, it loses focus after it is opened.
    Does anyone know a way to bring the new window to the front?
    Thanks!
    Hart

    hello thomas!
    is this problem with the losing focus when you open a second window fixed now?
    can i set the focus in a new opening window manually?
    thanks for your help...
    peter

  • Airport Losing Focus??

    I have a Mac set as an FTP server at a second location for backing up. My server at my first location will start backing up, completing some files. After a while, the network light on the modem at location 2 will stop blinking (indicating no traffic). The message from my backup software is "(FTP: server disconnected or timed out)". I can browse the web with no problems when this is happening. Is my Airport Extreme just losing focus?
    Also, pod casts will not down load to same FTP server. I'll get anywhere from 1/8 to 1/2 of a pod cast before the network traffic light stops blinking.
    Help! Boss is getting nervous. Thanks.

    Thanks JJMack.  I was hoping it wasn't the card I was using.  This is the first time I've used a geforce card on my work PC.  However it's not the first time I've used them with Adobe's apps.  For years my personal PCs had them and usually without issues like this.  We chose to attempt to use this new Geforce GTX980 card because of how much further advanced it is over midrange Quadro cards at the moment, and because of some of the other software I am using that is more viewport and video ram dependent.  Adobe applications are still my mainstay but we couldn't justify the purchase of older technology midrange K4000 cards that were supposedly newer than my older 4000.  As these still had older PCI connections than the HP workstations we built, among other tech such as cuda core amounts that are drastically behind the times.  Jumping up to 6000 level Quadro cards for up to date technology just isn't in the budget as the prices are astronomical. As with the Titan cards cards that are high priced and yet older tech.  So we made the decision to try the GTX card for a while.  Right now this sporadic window focus issue seems to be the only new issue I've run into so far.   I'm sure I will see more in the near future doing something if the card is the issue.  Maybe the new types of hardware being used such as the PCI express hard drive, or very recent photoshop updates can be blamed.  Just not figuring it out just yet.
    I was informed by an IT professional here that has application creation experience that this truly seemed like an application problem more than a graphic card problem.   But until someone can corroborate that thought I guess I'm going to keep blaming the newer GTX card or wait to see if an App update makes this go away quietly.  No one else has chimed in yet.  Thanks for the link.

  • Making JFrame Window Lose Focus to a Native Window

    How can i from within the same JFrame code or another class with the JFrame reference make JFrame lose focus to another native window on the desktop.
    Any tips

    In the core java API you can not make a native window take focus, you would have to use native code (JNI).
    The best you could do would be minimize the JFrame.

  • After Effects losing focus causes FREEZE

    Hello,
    I've a big problem with After Effects CS6 AND CC, when the window loses focus, it freezes with or without an opened project ("Not responding") !

    Nobody can help me?

  • Question-How to fix Robohelp8 window keeps focus when it shouldn't?

    I converted a robohelp 8 for word project to robohelp 8 for HTML this year.  The software GUI it is part of is created with PowerBuilder 12.1.  The HTML help works fine in the application, except that once the help window is opened, only that window has focus. If you navigate to another GUI window and keep the help opened, it remains in the back which is correct.  If you navigate back to the original GUI window, the help window is "stuck" on top where it originally was, when it should be in the background.  The old robohelp for word doesn't have this problem.  I have checked all the window properties settings, and all are basic default values.  I do have the "remember size and position" option turned on, so that you can move the help window out of the way of the GUI, and then it works fine.  But my developers want the focus issue to be fixed.  It occurs both in XP and  Windows 7.  Is this something I can fix in robohelp?  Or is it a PowerBuilder issue?
    I have another help project created with robohelp 8 html with same window properties & that one does not have this problem.  That GUI is created with Visual Studio 2008.
    Thank you very much!!
    Judy

    Hi Judy
    Likely you need to ask your developers to examine the calls for the application where things work as expected. My guess is that they will find there is a change they need to make in the way they call the help. There really isn't much in RoboHelp that influences this behavior. You can look at the extended properties for the window, but I'm doubtful you will find that anything has been set that would cause it.
    Cheers... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7, 8 or 9 within the day!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • Jerky video when window has focus

    I am new to the Mac world and everything is good except for jerky video playback.
    When watching video I find that if the window playing the video has focus then the video is jerky but if another window has focus the video playback in the window with the video is smooth. This is certainly the case for watching Youtube (safari or firefox) and iTunes video clips.
    Do others have this problem

    I tried what you are describing and observed no fuzziness of the video. I had two applications open at the time and switched from one to the other. It just might be the video.

  • Upgraded to Windows 8.1 Pro - new window is losing focus after while

    Hi,
    Just upgraded to 8.1 pro. When new window is opened (any application), after about 5-10 secs focus is lost. And again.... I have to click on window to regain focus. VERY ANNOING WHEN TYPING DOCO
    ANY SOLUTION MR MICROSOFT?
    1. Lodged problem with MS, but bo reply for 5 days
    2. Started reading posts on net - some about mouse behaviour got my attention
    3. Downloaded and installed latest drivers for Microsort mouse
    4. Unpluged 'old' mouse and plugged in new mouse(the same model
    5. Problem solved - no more problems with focus
    6. Conclusion - could ba a problem with Windows upgrade - mouse locked?

    For this problem, May be we can check Event Viewer if it identify the problem.
    In addition, try to make a clean boot or boot into Safe Mode to test whether this problem caused by 3rd problem, service or driver.
    For more details about Clean boot, please refer to the link below:
    http://support.microsoft.com/kb/929135
    Roger Lu
    TechNet Community Support

  • Losing focus of front window?

    When you hide safari (version 2.0 in conjunction with 10.4) and then return, the front window is not the one you left it with.
    The front window becomes the first window you opened, with the focus remaining on the old front window.
    For example, if you have two windows open (apple.com and bbc.co.uk respectively), hide safari and return, apple.com will be the front window (hiding the other), but when you hit apple-R, the 'back window' (bbc) will refresh.
    Can you fix this - it's really bugging me.

    Hi Ric,
    Despite toby's first post here I can confirm his problem because I have exactly the same problem. And I think there are other people effected by this Focus problem also assuming Toby and I are not the only ones.
    The problem is Exactly as Toby describes in his post. The focused window disappears behind another window, when two or more windows are open, when you return to Safari after a command H to hide the program.
    The focus is still on the same window (which was at the front) when leaving Safari (noticed by the red yellow and green focus buttons top left) BUT the window has moved to the back of the stack, leaving you with a different (unfocused, hence the grey dots) window when you return after a hide command.
    This is extremely annoying and is definitely something having to do with either Tiger (10.4.2/1) or the new Safari because under Panther and Safari 1.3 this problem was not there...
    So help to this bug would be appreciated and passing this bug along to the Safari dev team would also help (I think).
    Thanks .

  • JTable custom cell editor losing focus

    This is a followup to Re: Tutorial on AWT/Swing control flow wherein I ask for pointers to help me understand the source of focus-loss behaviour in my JTable's custom cell editor.
    I have done some more investigations and it turns out that the focus loss is a more general problem with custom cell editors which call other windows. Even the color-picker demo in the JTable tutorial at http://download.oracle.com/javase/tutorial/uiswing/examples/components/index.html#TableDialogEditDemo has this problem, IF you add a text field or two to the layout BEFORE the table. The only reason the table in the demo doesn't lose the focus when the color-picker comes out is because the table is the only thing in the window!
    Here is the demo code, augmented with two text fields, which are admittedly ugly here but which serve the desired purpose:
    * Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved.
    * Redistribution and use in source and binary forms, with or without
    * modification, are permitted provided that the following conditions
    * are met:
    *   - Redistributions of source code must retain the above copyright
    *     notice, this list of conditions and the following disclaimer.
    *   - Redistributions in binary form must reproduce the above copyright
    *     notice, this list of conditions and the following disclaimer in the
    *     documentation and/or other materials provided with the distribution.
    *   - Neither the name of Oracle or the names of its
    *     contributors may be used to endorse or promote products derived
    *     from this software without specific prior written permission.
    * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS
    * IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
    * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
    * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE COPYRIGHT OWNER OR
    * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
    * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
    * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
    * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
    * LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
    * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
    * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    import javax.swing.*;
    import javax.swing.border.Border;
    import javax.swing.table.AbstractTableModel;
    import javax.swing.table.TableCellEditor;
    import javax.swing.table.TableCellRenderer;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    public class TableDialogEditDemo extends JPanel {
        public class ColorEditor extends AbstractCellEditor
                implements TableCellEditor,
                ActionListener {
            Color currentColor;
            JButton button;
            JColorChooser colorChooser;
            JDialog dialog;
            protected static final String EDIT = "edit";
            public ColorEditor() {
                //Set up the editor (from the table's point of view), which is a button.
                //This button brings up the color chooser dialog, which is the editor from the user's point of view.
                button = new JButton();
                button.setActionCommand(EDIT);
                button.addActionListener(this);
                button.setBorderPainted(false);
                //Set up the dialog that the button brings up.
                colorChooser = new JColorChooser();
                dialog = JColorChooser.createDialog(button, "Pick a Color", true,  //modal
                        colorChooser, this,  //OK button handler
                        null); //no CANCEL button handler
             * Handles events from the editor button and from the dialog's OK button.
            public void actionPerformed(ActionEvent e) {
                if (EDIT.equals(e.getActionCommand())) {
                    //The user has clicked the cell, so bring up the dialog.
                    button.setBackground(currentColor);
                    colorChooser.setColor(currentColor);
                    dialog.setVisible(true);
                    //Make the renderer reappear.
                    fireEditingStopped();
                } else { //User pressed dialog's "OK" button
                    currentColor = colorChooser.getColor();
            public Object getCellEditorValue() {
                return currentColor;
            public Component getTableCellEditorComponent(JTable table,
                                                         Object value,
                                                         boolean isSelected,
                                                         int row,
                                                         int column) {
                currentColor = (Color) value;
                return button;
        public class ColorRenderer extends JLabel
                implements TableCellRenderer {
            Border unselectedBorder = null;
            Border selectedBorder = null;
            boolean isBordered = true;
            public ColorRenderer(boolean isBordered) {
                this.isBordered = isBordered;
                setOpaque(true);
            public Component getTableCellRendererComponent(
                    JTable table, Object color,
                    boolean isSelected, boolean hasFocus,
                    int row, int column) {
                Color newColor = (Color) color;
                setBackground(newColor);
                if (isBordered) {
                    if (isSelected) {
                        if (selectedBorder == null) {
                            selectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5,
                                    table.getSelectionBackground());
                        setBorder(selectedBorder);
                    } else {
                        if (unselectedBorder == null) {
                            unselectedBorder = BorderFactory.createMatteBorder(2, 5, 2, 5,
                                    table.getBackground());
                        setBorder(unselectedBorder);
                return this;
        public TableDialogEditDemo() {
            super(new GridLayout());
            JTextField tf1 = new JTextField("tf1");
            add(tf1);
            JTextField tf2 = new JTextField("tf2");
            add(tf2);
            JTable table = new JTable(new MyTableModel());
            table.setPreferredScrollableViewportSize(new Dimension(500, 70));
            table.setFillsViewportHeight(true);
            JScrollPane scrollPane = new JScrollPane(table);
            table.setDefaultRenderer(Color.class,
                    new ColorRenderer(true));
            table.setDefaultEditor(Color.class,
                    new ColorEditor());
            add(scrollPane);
        class MyTableModel extends AbstractTableModel {
            private String[] columnNames = {"First Name",
                    "Favorite Color",
                    "Sport",
                    "# of Years",
                    "Vegetarian"};
            private Object[][] data = {
                    {"Mary", new Color(153, 0, 153),
                            "Snowboarding", new Integer(5), new Boolean(false)},
                    {"Alison", new Color(51, 51, 153),
                            "Rowing", new Integer(3), new Boolean(true)},
                    {"Kathy", new Color(51, 102, 51),
                            "Knitting", new Integer(2), new Boolean(false)},
                    {"Sharon", Color.red,
                            "Speed reading", new Integer(20), new Boolean(true)},
                    {"Philip", Color.pink,
                            "Pool", new Integer(10), new Boolean(false)}
            public int getColumnCount() {
                return columnNames.length;
            public int getRowCount() {
                return data.length;
            public String getColumnName(int col) {
                return columnNames[col];
            public Object getValueAt(int row, int col) {
                return data[row][col];
            public Class getColumnClass(int c) {
                return getValueAt(0, c).getClass();
            public boolean isCellEditable(int row, int col) {
                if (col < 1) {
                    return false;
                } else {
                    return true;
            public void setValueAt(Object value, int row, int col) {
                data[row][col] = value;
                fireTableCellUpdated(row, col);
        private static void createAndShowGUI() {
            JFrame frame = new JFrame("TableDialogEditDemo");
            frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
            JComponent newContentPane = new TableDialogEditDemo();
            newContentPane.setOpaque(true);
            frame.setContentPane(newContentPane);
            frame.pack();
            frame.setVisible(true);
        public static void main(String[] args) {
            javax.swing.SwingUtilities.invokeLater(new Runnable() {
                public void run() {
                    createAndShowGUI();
    }When you come back from choosing a color, tf1 is given the focus, instead of the table. This is because bringing the color picker window to the front causes a focus lost event for the cell editor component; it's temporary, as it should be, so why on earth is the system losing track of who has focus in the window??
    I see the following in Window#getMostRecentFocusOwner():
      public Component getMostRecentFocusOwner()
        if (isFocused())
          return getFocusOwner();
        else
          Component mostRecent =
            KeyboardFocusManager.getMostRecentFocusOwner(this);
          if (mostRecent != null)
            return mostRecent;
          else
            return (isFocusableWindow())
                   ? getFocusTraversalPolicy().getInitialComponent(this)
                   : null;
      }My app has a custom focus traversal policy, so I'm able to see who is being called, and indeed, getInitialComponent() is being called. Clearly, the KeyboardFocusManager is actually losing track of the fact that the table was focussed at the point where control was transferred to the color picker! This strikes me as completely unreasonable, especially since, as noted, this is a temporary focus loss event, not a permanent one.
    I'd be grateful for any wisdom in solving this, since similar behaviour to this little demo -- without focus loss, naturally -- is an essential part of my application.

    Looks like it is because the 'restore-focus-to-previous-after-modal-dialog-close' is in a later event than when the control returns to the action performed (which I guess makes sense: it continues the action event handler and the focus events are handled later, but I needed two chained invoke laters so it might also be that the OS events comes later).
    The following works for me (in the actionPerformed edited):
               // create the dialog here so it is correctly parented
               // (otherwise sometimes OK button not correctly the default button)
               dialog = JColorChooser.createDialog(button, "Pick a Color", true,  //modal
                            colorChooser, this,  //OK button handler
                            null); //no CANCEL button handler
                    //The user has clicked the cell, so bring up the dialog.
                    button.setBackground(currentColor);
                    colorChooser.setColor(currentColor);
                    button.addFocusListener(new FocusListener() {
                        @Override
                        public void focusLost(FocusEvent e) {}
                        @Override
                        public void focusGained(FocusEvent e) {
                            // dialog closed and focus restored
                            button.removeFocusListener(this);
                            fireEditingStopped();
                    dialog.setVisible(true);but a simpler request might be better (althoug I still need an invoke later):
    // rest as before except the FocusListener
                    dialog.setVisible(true);
                    button.requestFocusInWindow();
                    EventQueue.invokeLater(new Runnable() {
                        public void run() {
                            fireEditingStopped();
                    });And a quick fix to the renderer so you can actualy see the focus on it:
                    if(hasFocus) {
                        Border border = DefaultLookup.getBorder(this, ui, "Table.focusCellHighlightBorder");
                        setBorder(BorderFactory.createCompoundBorder(
                                border, BorderFactory.createMatteBorder(1, 4, 1, 4,
                                        ((MatteBorder) getBorder()).getMatteColor())));
                    }

  • JMenu doesn't dissapear when menu is losing focus

    Hello everyone!
    I have a JMenu with several JMenuItems. The problem is that the JMenu doesn't dissapear when the menu is losing it's focus, for example when I click somewhere in the application window. I use the Windows look and feel for my application.
    Any ideas ? Thanks.

    Add some try/catch block. My guess is that you bump in some NullPointerException.

  • Problem with applet, popup window and focus loss

    Hi all !
    I've got a problem when my applet lose the focus. Let me explain :
    I've got an applet embed in a jsp page. There are several buttons in it that allow the user to open modal windows.
    The problem comes when the user gives the focus to another application whithout closing the modal window first.
    When he tries to come back to the web page owning the applet (using the task bar), then the modal window stays behind it and blocks any action on the applet.
    Does anyone know how to force the modal window to be displayed in front of the applet, even when the user plays with focuses ?
    Thank's in advance.

    thank you for your help, sils.
    I've written that code :
    * Cr�� le 31 ao�t 05
    package com.scor.apricot.web.rpc.ltnp.applet.listener.ldf;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import javax.swing.JDialog;
    import javax.swing.JPanel;
    public class AppletWindowListener extends WindowAdapter {
         private JPanel panel;
         private JDialog dialogWindow;
         public AppletWindowListener(JPanel panel, JDialog dialogWindow) {
              this.panel = panel;
              this.dialogWindow = dialogWindow;
         public void windowActivated(WindowEvent e) {
              if (dialogWindow!=null && dialogWindow.isShowing())
                   dialogWindow.toFront();
    }Is that right ?
    I don't know how to add the listener, where must I put the addWindowListener method ? It seems that this method cannot be used with a JApplet object.

  • Javascript popups that open in same window causing focus problem

    I have been using javascript popups in actionscript buttons
    for some time with no issues. However, on a specific movie I have 2
    button links, each of which opens a pdf file. I need each pdf to
    open using the same new window to avoid multiple new windows
    opening.
    This works fine on the first link I open - the new window
    appears on top of the main window. The second link, however, opens
    underneath the main window despite the focus() code. This only
    happens in IE - works fine in Firefox.
    Code used:
    link3_btn.onRelease = function() {
    getURL
    ("javascript:NewWindow=window.open('docs/first.pdf','newWin22','width=700,height=500,left =1
    0,top=10,toolbar=No,location=No,scrollbars=Yes,sta
    tus=Yes,resizable=Yes');NewWindow.focus();void(0); ");
    link4_btn.onRelease = function() {
    getURL
    ("javascript:NewWindow=window.open('docs/second.pdf','newWin22','width=700,height=500,lef t=
    10,top=10,toolbar=No,location=No,scrollbars=Yes,st
    atus=Yes,resizable=Yes');NewWindow.focus();void(0) ;");
    Any help would be appreciated. Thanks.

    This is how the code should look:
    link3_btn.onRelease = function() {
    getURL
    ("javascript:NewWindow=window.open('docs/first.pdf','newWin22','width=700,
    height=500,left=10,top=10,toolbar=No,location=No,scrollbars=Yes,status=Yes
    ,resizable=Yes');NewWindow.focus();void(0); ","_self");
    link4_btn.onRelease = function() {
    getURL
    ("javascript:NewWindow=window.open('docs/second.pdf','newWin22','width=700,height=500,lef t=
    10,top=10,toolbar=No,location=No,scrollbars=Yes,st
    atus=Yes,resizable=Yes');NewWindow.focus();void(0) ;","_self");
    }

Maybe you are looking for

  • Issue in custom BAPi

    Hi, We had created a custom BAPI. This BAPI is having a method, which in turn calls a custom FM (RFC enabled). This was working fine but due to some requirement we had to change the structure of one of the parameter used in the interface of the FM. T

  • IMac 24¨External display no longer working

    I have a Intel iMac 24¨using an additional external display - Fujitsu. It has worked perfectly since I bought it and suddenly the external display will no longer work. There is nothing wrong with the Fujitsu because I have tested it on other computer

  • Custom META attribute

    Hi, I've looked at HTML source of a Standard Portal page and I saw that some META tags describing current page are present: <META name="title" content="News"> <META name="description" content="News page of my Website"> <META name="keywords" content="

  • Re: Receiving a call and the number of rings

    I cannot discover how to change the number of times my phone rings before it goes to voice mail or terminates the call.  At present, it only rings twice, and that is not enough time to get the phone out of my purse, off my desk, and/or answer before

  • Built in Storage media ERROR

    Blackberry Torch 9800 v6.0.0.246, platform 6.4.0.105 Hello, I receive a Blackberry Torch for Christmas.  It was working great until I connected it to the computer for first time and did the updates and backup suggested.  I now get the message "Built