Bob a écrit :
I am trying to create a popup page (to act as a menu) from a parent
page. When the parent page (index.jsp) calls my popup function (see
below) it will properly open the correct size browser window only if
the browser that index.jsp is opened in is NOT maximized. If index.jsp
is maximized and then I click on the test link that fires off the
openMain function, the browser that is opened for the popup is also
maximized.
You can not force a maximized window. It is not recommendable to have a
secondary window being maximized to begin with.
" How do I force a maximized window?
You cannot. All browser manufacturers try to make the opening of
new secondary windows noticed by users and noticeable by users to avoid
confusion, to avoid disorienting users."
http://developer.mozilla.org/en/docs/DOM:window.open#FAQ
function openMain()
{
window.open("main.jsp","main","width=200,height=325,location=0,status=0,scrollbars=0");
}
You want to constrain window dimensions and, at the same time, you
remove the normal, standard ability of all browser windows to be
resizable and to render scrollbars if needed, if content overflows rigid
window dimensions. What you do is anti-usability, user-unfriendly and it
goes against normal, safe, cautious fallback mechanism if/when a window
is too short, too narrow for users.
Also, note that a majority of browsers now force the presence of the
status bar; browser manufacturers have now acknowledge the importance of
always rendering the status bar for security reasons
"The status bar also provides info on http connection, hypertext
resource location, download progress bar, encryption/secure connection
info with SSL connection (displaying a yellow padlock icon),
internet/security zone icons, privacy policy/cookie icon, etc. Removing
the status bar usually removes a lot of functionality, features and
information considered useful (and sometimes vital) by the users."
http://developer.mozilla.org/en/docs/DOM:window.open#Note_on_status_bar
Does anyone have any idea what I am doing wrong or how I can get the
popup to open up in the appropriate sized window and not maximized?
Thank you!
Bob
Trying to perfectly size a secondary window is extremly difficult; it
often fails because of factors the scripter is not aware of and for
which he/his script can not take into consideration.
- user has default minimum font size: such impacts the document box
- user has custom stylesheet
- etc.
You should explain what is it with your window that is so important for
that window to be dimensioned so meticulously to start with. You should
also understand that the users are the only ones who are going to use
such window: they can and they should be the ones being able to resize
that window if needed and whenever they wish, being able to access the
content of such window with the browser normal functionality.
Gérard