Menu re-opens after alert (MessageBox) is closed outside of browser window

1 posts, 0 answers
  1. Polaris431
    Polaris431 avatar
    30 posts
    Member since:
    Jul 2007

    Posted 21 Jan 2009 Link to this post

    Using client-side code, I bring up a MessageBox (alert) when a menu item is clicked. I close the menu item using the close() method prior to using the alert method. The browser window where the menu is located is small and not centered on the screen. When the MessageBox appears, it appears in the middle of the screen and outside of the browser window. After I close the MessageBox, the menu item that I previously closed re-opens again. Only after I move the mouse over the browser window will it close. However, if the browser window is large enough or centered on the screen, the menu item will close after the MessageBox closes. I prefer not to relocate the browser window or resize it, if possible. I don't believe it's possible to have the MessageBox appear centered over the browser window (unless someone knows how to do that). Therefore, the only solution I can think of is that something has to be done in Javascript. Is there a way to refresh the menu or do something to guarantee that it closes even if the mouse is outside of the browser window?
Back to Top