JMenu:How to keep popup menu open after clicking disabled JMenuItem

A menu usually shows all options, even those that are for some reason disabled. When clicking on a disabled option, nothing should happen. Unfortunately, the JMenu does not follow this philosophy: clicking on a disabled option fires no action, but the popup menu closes. It is a minor problem but I prefer the standard behaviour. Any ideas ?
Thanks
Cyril Mrazek

I am also having the same problem, if any one find out solution for this mail me . My mail Id is [email protected]

Similar Messages

  • How do I keep file menu open after CheckBox has been selected?

    The following represents a written code for a menu with checkboxes. I would like the menu to stay open after a check box has been selected. Does anyone have a suggested modification for this to occur?
    Thanks,
    JR
    public class NewJFrame extends javax.swing.JFrame {
    /** Creates new form NewJFrame */
    public NewJFrame() {
    initComponents();
    /** This method is called from within the constructor to
    * initialize the form.
    * WARNING: Do NOT modify this code. The content of this method is
    * always regenerated by the Form Editor.
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">
    private void initComponents() {
    jMenuBar1 = new javax.swing.JMenuBar();
    jMenu1 = new javax.swing.JMenu();
    jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
    jCheckBoxMenuItem2 = new javax.swing.JCheckBoxMenuItem();
    jCheckBoxMenuItem3 = new javax.swing.JCheckBoxMenuItem();
    jMenu2 = new javax.swing.JMenu();
    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    jMenu1.setText("File");
    jCheckBoxMenuItem1.setSelected(true);
    jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1");
    jMenu1.add(jCheckBoxMenuItem1);
    jCheckBoxMenuItem2.setSelected(true);
    jCheckBoxMenuItem2.setText("jCheckBoxMenuItem2");
    jMenu1.add(jCheckBoxMenuItem2);
    jCheckBoxMenuItem3.setSelected(true);
    jCheckBoxMenuItem3.setText("jCheckBoxMenuItem3");
    jMenu1.add(jCheckBoxMenuItem3);
    jMenuBar1.add(jMenu1);
    jMenu2.setText("Edit");
    jMenuBar1.add(jMenu2);
    setJMenuBar(jMenuBar1);
    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 400, Short.MAX_VALUE)
    layout.setVerticalGroup(
    layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
    .addGap(0, 279, Short.MAX_VALUE)
    pack();
    }// </editor-fold>
    * @param args the command line arguments
    public static void main(String args[]) {
    java.awt.EventQueue.invokeLater(new Runnable() {
    public void run() {
    new NewJFrame().setVisible(true);
    // Variables declaration - do not modify
    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;
    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem2;
    private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem3;
    private javax.swing.JMenu jMenu1;
    private javax.swing.JMenu jMenu2;
    private javax.swing.JMenuBar jMenuBar1;
    // End of variables declaration
    }

    Sorry Jack.
    Here is the code so that it appears more readable whenever it gets moved.
    public class NewJFrame extends javax.swing.JFrame {
        /** Creates new form NewJFrame */
        public NewJFrame() {
            initComponents();
        /** This method is called from within the constructor to
         * initialize the form.
         * WARNING: Do NOT modify this code. The content of this method is
         * always regenerated by the Form Editor.
        @SuppressWarnings("unchecked")
        // <editor-fold defaultstate="collapsed" desc="Generated Code">
        private void initComponents() {
            jMenuBar1 = new javax.swing.JMenuBar();
            jMenu1 = new javax.swing.JMenu();
            jCheckBoxMenuItem1 = new javax.swing.JCheckBoxMenuItem();
            jCheckBoxMenuItem2 = new javax.swing.JCheckBoxMenuItem();
            jCheckBoxMenuItem3 = new javax.swing.JCheckBoxMenuItem();
            jMenu2 = new javax.swing.JMenu();
            setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
            jMenu1.setText("File");
            jCheckBoxMenuItem1.setSelected(true);
            jCheckBoxMenuItem1.setText("jCheckBoxMenuItem1");
            jMenu1.add(jCheckBoxMenuItem1);
            jCheckBoxMenuItem2.setSelected(true);
            jCheckBoxMenuItem2.setText("jCheckBoxMenuItem2");
            jMenu1.add(jCheckBoxMenuItem2);
            jCheckBoxMenuItem3.setSelected(true);
            jCheckBoxMenuItem3.setText("jCheckBoxMenuItem3");
            jMenu1.add(jCheckBoxMenuItem3);
            jMenuBar1.add(jMenu1);
            jMenu2.setText("Edit");
            jMenuBar1.add(jMenu2);
            setJMenuBar(jMenuBar1);
            javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
            getContentPane().setLayout(layout);
            layout.setHorizontalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 400, Short.MAX_VALUE)
            layout.setVerticalGroup(
                layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                .addGap(0, 279, Short.MAX_VALUE)
            pack();
        }// </editor-fold>
        * @param args the command line arguments
        public static void main(String args[]) {
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new NewJFrame().setVisible(true);
        // Variables declaration - do not modify
        private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem1;
        private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem2;
        private javax.swing.JCheckBoxMenuItem jCheckBoxMenuItem3;
        private javax.swing.JMenu jMenu1;
        private javax.swing.JMenu jMenu2;
        private javax.swing.JMenuBar jMenuBar1;
        // End of variables declaration
    }

  • Keeping the Menu visible after an action is performed.

    I'm trying to capture the right click events on JMenuItems and display popup menu options for the selected JMenuItem. I've managed to capture the right click and get the Popup ready; however, when the right click is performed, or any other type of "action", the Menu dissappears. How can I keep the menu visible?

    The following code should prevent the menu from closing on a right click:
         class RightClickJMenuItem extends JMenuItem
              public RightClickJMenuItem(String str)
                   super(str);
              protected void processMouseEvent(MouseEvent e)
                   if (e.getModifiers() != MouseEvent.BUTTON3_MASK)
                        super.processMouseEvent(e);
         }

  • How to keep the field open for input with error message in report program

    Hi,
      Need a help in solving the below issue.
    "How to keep the field open for input with error message in report program"
    Regards,
    C.Shasiraj.

    Hi...
    you have to use the event:
    <b>AT SELECTION-SCREEN ON <FIELD> EVENT.</b>
    u have to give an error message in this event.
    Consider the following <b>Example:</b>
    <b>PARAMETERS : NUMBER TYPE I.
    AT SELECTION-SCREEN ON NUMBER.
      IF NUMBER = 10.
        MESSAGE 'Number vakue is 10' TYPE 'E'.
      ENDIF.
    START-OF-SELECTION.
      WRITE NUMBER.
    </b>
    in this if u give the value of number = 10, it will not proceed further, if u give some other value other than 10 you will proceed further...
    Execute this program once u will understand....
    also Consider the following links :
    <b>Regarding events:</b>
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/34a237d9b511d1950e0000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/79/34a23ad9b511d1950e0000e8353423/frameset.htm
    <b>Regarding messages:</b>
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/aa575426ad11d2954d0000e8353423/frameset.htm
    http://help.sap.com/saphelp_erp2005vp/helpdata/en/c5/aa575426ad11d2954d0000e8353423/frameset.htm
    This is very useful.......
    Reward points if useful....
    Suresh....

  • How i create popup menu when button onclick

    how i create popup menu when button onclick

    You try adding a scrip tag in your jsp code, and calling the function in the onclick attribute.
    Example:
    <script><![CDATA[
                    function confirmDelete(){
                    if(confirm("Are you sure you want to delete selected user")){
                    return true;
                    } else{
    return false;
    ]]></script>
    <ui:button action="#{View.delete_action}" binding="#{View.delete}" id="delete" onclick="confirmDelete"/>
    Cheers
    Daniel
    null

  • Erec - When an External window opens after click of a button

    We are using an Standard Webdynpro Erec Appln.
    When an External window opens after click of a button the smart form embedded in that windows view is not appearing instead and small X mark (in Red)  is appearing with fully plain background
    It is happening only for my system, others are able to view it properly...
    I have cleared the cache, restarted the system and also re-installed the Adobe Reader too..
    But still the problem persists.. Let me know what can be done in this case...
    Thanks & regards,
    Rashmi

    The service that you are trying to use requires integration of adobe with in browser(IE). Check the option [Display PDF in browser |http://lh4.ggpht.com/_E1SpYl0ZbfE/SlI0rfQAxeI/AAAAAAAAAh4/fC9alkf1M78/Adobe_Setting.gif]in Adobe Reader preferences.
    If it still doesn't show the PDF, try to reset the browser setting to Medium and re-open.
    Regards,
    Trikanth Basetty

  • Popup menu with right-click

    I am investigating the feasibility of adding "Personalised Menu"
    functionality to a Forms application. The idea is that regardless
    of what form a user is currently in, he/she will be able
    to right click on the canvas to display a list of "favourite screens".
    Next, s/he will pick a screen from this list and hey presto will
    be navigated to it. There will need to be "Do you want to save
    your changes?" processing of course before hopping to the new screen.
    When the user right-clicks s/he should see a customised list of menu options:
    user "Peter" could have e.g. a menu with options "Screen A", "Screen C", "Screen D";
    user "Paul" could have screens E,F,G,J on his list and "Mary" could have
    screens A,B,K,Q,R. There will be companion admin functionality to allow
    users to maintain the options they want on their personalised menus but
    this is easy to code using standard forms functionality.
    To simulate the functionality I have created a little PERSMENU form
    to display the user's personalised list of screens on a standard
    multi-row block.
    This is executed via a CALL_FORM in the PRE-POPUP-MENU trigger.
    Of course if I use a called form to display the menu options then
    I need to check if the calling form has any unsaved changes beforehand.
    Which is a bit clunky.
    Another alternative would be to add a PERSMENU block to each form
    in the application. If the user were to right-click on a form's canvas
    the form would attempt to navigate to PERSMENU and then execute_query.
    But of course WHEN-VALIDATE-ITEM triggers etc could prevent the navigation
    and once again the proposal is a bit clunky.
    I have been reading the "Popup menu with left click on 10g" thread at
    Popup menu with left click on 10g
    and am interested in the javabean provided by "Nalin R". Unfortunately
    I am new to java and don't understand the code. But this looks to be
    tantalisingly close to what I am trying to do albeit with "left-click"
    rather than "right-click".
    Has anyone attempted anything similar? Am I right in thinking that the
    javabean approach offers the best solution and if so is there any
    sample code that would help?

    ( (BasicInternalFrameUI)internalFrame.getUI() ).getNorthPane().addMouseListener( new MouseListener(){
    public void mouseClicked( MouseEvent me ){
    //do what ever you want
    });

  • JSF Popup Menu on right click

    Hi ,
    I want to popup menu on right click of any component(say tree).I searched on the net and found the tomahawk <t:popup> component.
    This component popup the menu when mouse pointer enter in to the component but I don't want this behavior.
    I want to popup the menu only when I right click on the component.
    This is sample program
    <t:popup id="a"
    styleClass="popup"
    closePopupOnExitingElement="true"
    closePopupOnExitingPopup="true"
    displayAtDistanceX="10"
    displayAtDistanceY="10" >
    <h:outputText id="oa" value="#{country.name}"/>
    <f:facet name="popup">
    <h:panelGroup>
    <h:panelGrid columns="1" >
    <h:outputText value="#{country.cities}"/>
    </h:panelGrid>
    </h:panelGroup>
    </f:facet>
    </t:popup>
    DO you have any component like this ? Or any other way to do like this ?
    Thanks in Advance,
    KK

    I wrote a component a while back that does something similar to what you want. You'd probably need to fix it up and add any features that you need that it doesn't already have. It pops up a menu on a right-click, it allows you to provide a facet to supply the contents of the menu. I doubt I made sure it works in IE or any browser other than Firefox... so there may be JS issues. It has some other component dependencies you might want to remove also. I could get it to the point where you could try it out and fix it up if you want, but I won't have time until next week.
    Ken Paulsen
    https://jsftemplating.dev.java.net

  • How do I re-order popup-menu (open in new tab to the top)

    Popup-menu is reordered to have share-option at the top in the new version of android browser.
    How do I change the open in new tab-option to be the topmost option?

    Hi mtolvane,
    Currently in the customize options of Firefox for Android, this is not a feature. I would recommend requesting the feature in a bug.
    [https://bugzilla.mozilla.org/show_bug.cgi?id=1025326] I filed this bug.

  • How to keep all my itunes after install of leopard?

    Assume I am not all that when it comes to macs. Not new but rusty.
    I have tiger with itunes and it has loads of podcasts/albums(rips) etc, and also on my ipod touch. I would like some help as to how do I keep all this after I install leopard. I think I am going for a full install rather than an upgrade.
    The mac is an imac with pre-installed tiger. I am sure there is some way of keeping my itunes folder after i wipe the drive but have never done anything beyond fill up ipods with stuff.
    I thank you in advance for any pointers.

    Hi,
    I would suggest backing up your entire iTunes Music folder to an external hard drive or disk if the folder size is practical. To retain your playlists for reimport later on, open iTunes, select the Music Library and choose File->Export Library then save it off system along with the back up.
    I recommend using Terminal to back up your iTunes Music folder because Finder's drag and drop can sometimes corrupt copied files, particularly when the directory is large. Suppose you've connected a firewire or usb external hard drive and you can see it mounted on your Desktop, here's what I would do using Terminal (/Applications/Utilities):
    Open the directory ~/Music/iTunes/
    Open Terminal and type the command scp -r. Now drag in the folder iTunes Music (your copy source). Next drag in the external drive mounted on your Desktop (your copy destination). The Terminal window should now read something similar to this, press Return to start the copy process:
    scp -r ~/Music/iTunes/iTunes\ Music /Volumes/External HD
    When the process is complete the command prompt will return back to you. If you want to see the copy in progress change scp -r for scp -v -r. The -v makes the process verbose.
    I'm with you on choosing a clean install, i choose this method every time for upgrades. Archive and Install presents the possibility of dragging old conflicts back into a clean system.

  • How to place popup menu on clicking a Component

    Hi everybody.
    I have a swing application where I have JFrame and so many components in that. I want to open Popup menu on clicking a button. The menu should have three menu items into that. It looks very simple but I am not sure how should I do that.
    If possible, try to explain it with small piece of code.
    Thanks in advance.

    yourJbutton.addMouseListener(new MouseAdapter() { //Listen for mouse events
      public void mousePressed(MouseEvent e) {
        if (SwingUtilities.isRightMouseButton(e) == true && e.isMetaDown() == true) {
          JPopupMenu popup = new JPopupMenu();
          JMenuItem mItem = new JMenuItem("Something");
          mItem.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent e) {
              // do your thing
          popup.add(mItem);
          popup.addSeparator();
          mItem = new JMenuItem("Close Popup");
          mItem.addActionListener(new ActionListener() {public void actionPerformed(ActionEvent e) {}});
          popup.add(mItem);
          popup.show(e.getComponent(), e.getX(), e.getY());
    });

  • How to stop tabs re-opening after firefox crashes.........when it crashes and I have multiple tabs open, when re-starting firefox all of the tabs re-open too. How can I stop this?

    Firefox crashes quite often, especially when I have multi tabs open. I usually have to use CTRL ALT DEL and end the process as Firefox stops responding.
    My problem is not the crashing........it is the re-opening of the multiple tabs I had open, when normally it is one of them (not the home page) that caused the crash in the first place, so I cannot re-open firefox until I restart the pc, because every time I do it is the same story. Firefox tries to re-open all of the tabs and stops responding. I have looked in options but nowhere does it allow me to stop multiple tabs opening after a crash. If this continues, I will have to uninstall Firefox and stick to Chrome.

    Set the pref browser.sessionstore.max_resumed_crashes to 0 on the about:config page to get the about:sessionrestore page immediately with the first restart after a crash has occurred or the Task Manager was used to close Firefox.
    *http://kb.mozillazine.org/browser.sessionstore.max_resumed_crashes
    That will allow you to deselect the tab(s) that you do not want to reopen, but will allow to reopen other tabs.
    See:
    * http://kb.mozillazine.org/Session_Restore#Restoring_a_session_after_a_crash
    * http://kb.mozillazine.org/Browser.sessionstore.max_resumed_crashes
    To open the <i>about:config</i> page, type <b>about:config</b> in the location (address) bar and press the "<i>Enter</i>" key, just like you type the url of a website to open a website.<br />
    If you see a warning then you can confirm that you want to access that page.<br />
    *Use the Filter bar at to top of the about:config page to locate a preference more easily.
    *Preferences that have been modified show as bold (user set).
    *Preferences can be reset to the default or changed via the right-click context menu.

  • How to keep a border even after right-clicking

    I have a JButton around which I would like:
    1) a raised border to appear when hovering over the button,
    2) a lowered border to appear when left-clicking on the button,
    3) no border to appear when releasing or exiting the button, and
    4) a raised border to appear when right-clicking on the button and bringing up a popup menu.
    I created a MouseListener to achieve effects 1) through 3) above, but I'm having trouble achieving effect 4).
    It appears that showing a popup menu causes my MouseListener's mouseExited() method to be fired. This method, though, is currently only responsible for achieving effect 3).
    Is there a way to make my mouseExited() method smart enough to implement effect 4) instead of 3) if it realizes it has been invoked as a result of a popup menu display? In other words, is there a way to make a border appear around my button even when the user has opened up a popup menu for that button?
    I tried interrogating the value of MouseEvent.isPopupTrigger(), but that always appears to return false in mouseExited() [ it only ever returns true for me in mouseReleased() ].
    Any suggestions would be greatly appreciated.
    Thanks,
    Mike

    Jay,
    Thanks for your reply. Attached is my updated code that includes the popup listening logic. This logic seems to work, except for the following issues:
    1) The button becomes temporarily depressed when right-clicking on it (just as you stated).
    2) If I right click on a Button A to display its popup menu and then move my mouse over to another Button B, Button B becomes raised even though Button A's popup menu hasn't been dealt with yet.
    Regarding issue 1) above, could I test for whether mouse BUTTON_1 or BUTTON_2 was pressed to determine whether the mouse should be depressed, or would this make my logic platform-dependent?
    Regarding issue 2) above, is there a way to block other buttons from appearing raised while a popup menu still appears in support of another button? Or is there just a problem in my implementation of the popup (i.e. it doesn't expire)?
    Thanks,
    Mike
         public class ButtonBorderMouseListener implements MouseListener, PopupMenuListener
              public final Border NO_BORDER = BorderFactory.createEmptyBorder();
              public final Border LOWERED_BEVEL_BORDER = BorderFactory.createLoweredBevelBorder();
              public final Border RAISED_BEVEL_BORDER = BorderFactory.createRaisedBevelBorder();
              private boolean m_buttonPopupIsVisible;
              public ButtonBorderMouseListener()
                   super();
              public synchronized boolean buttonPopupIsVisible()
                   return m_buttonPopupIsVisible;
              public synchronized void setButtonPopupIsVisible(boolean isVisible_)
                   m_buttonPopupIsVisible = isVisible_;
              /* (non-Javadoc)
               * @see java.awt.event.MouseListener#mouseClicked(java.awt.event.MouseEvent)
              public void mouseClicked(MouseEvent e)
                   System.out.println("Mouse clicked");
                   System.out.println("Is a popup trigger == " + e.isPopupTrigger());
                   JButton sourceBtn = (JButton) e.getComponent();
                   Border borderToApply = ((buttonPopupIsVisible()) ? RAISED_BEVEL_BORDER : LOWERED_BEVEL_BORDER);
                   System.out.println("borderToApply == " + ((borderToApply == RAISED_BEVEL_BORDER) ? "RAISED" : "LOWERED"));
                   sourceBtn.setBorder(borderToApply);
              /* (non-Javadoc)
               * @see java.awt.event.MouseListener#mouseEntered(java.awt.event.MouseEvent)
              public void mouseEntered(MouseEvent e)
                   System.out.println("Mouse entered");
                   JButton sourceBtn = (JButton) e.getComponent();
                   sourceBtn.setBorder(RAISED_BEVEL_BORDER);
                   System.out.println("borderToApply == RAISED");
              /* (non-Javadoc)
               * @see java.awt.event.MouseListener#mouseExited(java.awt.event.MouseEvent)
              public void mouseExited(MouseEvent e)
                   System.out.println("Mouse exited");
                   System.out.println("Is a popup trigger == " + e.isPopupTrigger());
                   JButton sourceBtn = (JButton) e.getComponent();
                   Border borderToApply = ((buttonPopupIsVisible()) ? RAISED_BEVEL_BORDER : NO_BORDER);
                   System.out.println("borderToApply == " + ((borderToApply == RAISED_BEVEL_BORDER) ? "RAISED" : "NONE"));
                   sourceBtn.setBorder(borderToApply);
              /* (non-Javadoc)
               * @see java.awt.event.MouseListener#mousePressed(java.awt.event.MouseEvent)
              public void mousePressed(MouseEvent e)
                   System.out.println("Mouse pressed");
                   System.out.println("Is a popup trigger == " + e.isPopupTrigger());
                   JButton sourceBtn = (JButton) e.getComponent();
                   Border borderToApply = ((e.isPopupTrigger()) ? RAISED_BEVEL_BORDER : LOWERED_BEVEL_BORDER);
                   System.out.println("borderToApply == " + ((borderToApply == RAISED_BEVEL_BORDER) ? "RAISED" : "LOWERED"));
                   sourceBtn.setBorder(borderToApply);
              /* (non-Javadoc)
               * @see java.awt.event.MouseListener#mouseReleased(java.awt.event.MouseEvent)
              public void mouseReleased(MouseEvent e)
                   System.out.println("Mouse released");
                   System.out.println("Is a popup trigger == " + e.isPopupTrigger());
                   JButton sourceBtn = (JButton) e.getComponent();
                   Border borderToApply = ((e.isPopupTrigger()) ? RAISED_BEVEL_BORDER : NO_BORDER);
                   System.out.println("borderToApply == " + ((borderToApply == RAISED_BEVEL_BORDER) ? "RAISED" : "NONE"));
                   sourceBtn.setBorder(borderToApply);
              /* (non-Javadoc)
               * @see javax.swing.event.PopupMenuListener#popupMenuCanceled(javax.swing.event.PopupMenuEvent)
              public void popupMenuCanceled(PopupMenuEvent e)
                   System.out.println("Popup menu cancelled");
              /* (non-Javadoc)
               * @see javax.swing.event.PopupMenuListener#popupMenuWillBecomeInvisible(javax.swing.event.PopupMenuEvent)
              public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
                   System.out.println("Popup menu will become invisible");
                   setButtonPopupIsVisible(false);
                   JPopupMenu popupMenu = (JPopupMenu) e.getSource();
                   JButton sourceBtn = (JButton) popupMenu.getInvoker();
                   System.out.println("borderToApply == NONE");
                   sourceBtn.setBorder(NO_BORDER);    
              /* (non-Javadoc)
               * @see javax.swing.event.PopupMenuListener#popupMenuWillBecomeVisible(javax.swing.event.PopupMenuEvent)
              public void popupMenuWillBecomeVisible(PopupMenuEvent e)
                   System.out.println("Popup menu will become visible");
                    setButtonPopupIsVisible(true);
         }

  • How to make a menu (opened by an on click event) stay open on the following pages

    Hi,
    I have a side menu that shows the main headings only, when clicked it displays the rest of the menu using and slide effect, with an option to close the menu, on reversing the slide. This all works perfectly but what i want to be able to do is, when a users opens a menu and then uses that menu to navigate to another page, on that new page i want that menu that was opened to stay open on this next page.
    The code i have so far is below:
    // the function for the effect
    function MM_effectBlind(targetElement, duration, from, to, toggle)
        Spry.Effect.DoBlind(targetElement, {duration: duration, from: from, to: to, toggle: toggle});
    // the function to ensure the menu is unopened on page load
    function myFuncDisplay (){
    document.getElementById ('menu1').style.display='none';
    document.getElementById ('menu2').style.display='none';
    document.getElementById ('menu3').style.display='none';
    document.getElementById ('menu4').style.display='none';
    document.getElementById ('menu5').style.display='none';
    <body onload="myFuncDisplay ();">
    // the first menus code in the side menu that creates the on click and close menu actions
    <p onclick="MM_effectBlind('menu1', 1000, '0%', '100%', false)"  onMouseOver="this.style.color='#FFFFFF';" onMouseOut="this.style.color='#333333';">Menu One </p>
        <div id="menu1">
              <p class="close" onclick="MM_effectBlind('menu1', 1000, '100%', '0%', false); " onMouseOver=" this.style.color='#333333';" onMouseOut="this.style.color='#FFFFFF';"> close menu </p>
            <p><a href="firstLink.php">First Link</a></p>
            <p><a href="secondLink.php">Second Link</a></p>
            <p><a href="thirdLink.php">Third Link</a></p>
    I have tried setting a variable in the on click event then in the function myFuncDisplay() doing if else clauses to check if the variable was set and if so displaying the div as block in that function, expecting just that menu to display opened in sunsequent pages, it didn't work, itstead it displayed all menus open?
    Please can someone help me with a suggestion of how I can make this work, thank you in advance, i look forward to any replies.

    Hi,
    thanks for your reply, i am not actually using the spry menu, i am using the 'blind' effectthat I have adapted as per the code given, I wanted to make a menu that would open on click and the effect i have used works well, now  however I want the effect to remain open on different pages, as explained. i am looking for a way of adapting the function that makes the rest of the menu hidden on page load. So on page load the menu is hidden as per adapted code, apart from the menu heading, if the menu heading is clicked the menu opens, with an option to close it, if the user clicks on a link in the menu the new pages loads and the menu is   closed as per the onload instruction , I want a way to distinguish if the menu was clicked in one page it will recognise that and in the next page will not hide that particular menu until the user closes it themselves.
    Hope that makes it a bit clearer? look forward to any further help.

  • How to keep original email open when replying?

    I bet this is somthing simple, but I just can't figure it out. When I click reply on an email, the original closes. It's no big deal, but I like to have the original open to refer back to. Is there a way to set my mail to keep the original open when replying. Thanks in advance
    MacBook   Mac OS X (10.4.7)   Got my new MacBook. It's a wonderful thing!!! Video iPod!! Lots of toys!!!

    You're welcome.
    I am not getting the other option about keeping
    the preview pane visible.
    It seems you're not aware that the part of the main window where messages are listed can be split in two parts: the messages list at the top and the preview pane at the bottom. You can do this by either (1) dragging upwards the thin horizontal separator bar that's at the bottom of the window, or (2) just double-clicking on that bar (it has a tiny hole in the middle).
    How come when I delete an email in my .mac account,
    I have to delete it twice from the trash?
    Well, the answer to that question is way more involved than you might think.
    The behavior you've observed happens in Mail to any IMAP-type account for which deleted messages are stored locally (i.e. Preferences > Accounts > Mailbox Behaviors > Store deleted messages on the server has been turned OFF). The "reason" is that storing deleted messages locally for IMAP-type accounts causes Mail to move deleted messages in that account to a Deleted Messages (AccountName).mbox folder located within ~/Library/Mail/Mailboxes/.
    Deleting a message already in a Trash mailbox should cause the message to be permanently erased, BUT deleting a message from a mailbox located within ~/Library/Mail/Mailboxes/ (i.e. an "On My Mac" mailbox) should cause the message to be moved to the "On My Mac" Trash. Thus, in the particular case of a Deleted Messages (a Trash) mailbox stored within ~/Library/Mail/Mailboxes/, there are two conflicting behaviors, and it seems that Mail takes the latter into consideration first, i.e. deleting a message from the account's Trash under those conditions causes it to be moved to the "On My Mac" Trash instead of being permanently erased as would happen if the Deleted Messages folder was located within the account folder.
    This could very well be an oversight (a bug) rather than intended behavior, but that's how it works in the current version of Mail. If you're curious, the following somewhat amusing (but also lengthy and confusing) threads would give you an idea of how long it took me to figure out this one:
    emails won't delete on first try
    IMAP messages need trash deleted twice

Maybe you are looking for

  • 2010 iMac Ejects Discs After About 10-15 Seconds. Help??

    Hi guys, I just tried to put a DVD into my iMac and it ejects it after about 15 seconds. I tried another DVD and it does the same! Any suggestions? I bought the Mac December 2010 so I no longer have Apple Care. Please say it doesn't need a new drive!

  • Activating Object Services

    Hi, I am trying to activate General Object Services for viewing/creating attachments for FI Invoice ( FBV0 transaction ). I tried assigning the following roles for the user: SAP_BC_BMT_WFM_ADMIN SAP_BC_SRV_ARL_ADMIN SAP_BC_SRV_ARL_USER SAP_BC_SRV_USE

  • Configure archiver to read from both redo log members

    Hi, We have moved our Data Warehouse to a new SAN. The luns for the redo logs are getting hit heavily. Just trying to find out if on AIX it is possible to configure archiver so that it reads from both members, current iostat data shows reads of the r

  • When trying to share my screen in iChat, the other person only sees green

    When I try to share my screen with someone using iChat, the person sharing it with me cannot see anything on my screen. I've tried reinstalling Mac OS on my computer but it hasn't helped...what can I do?!

  • The older version of Quicktime Cannot be removed. Contact your techsupport

    The older version of Quicktime Cannot be removed. Contact your technical support group. Since the latyest version of Quicktime doen;t know how to remove previous versions of Quicktime, is there a program that can run to remove all references of quick