By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
437,605 Members | 2,129 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 437,605 IT Pros & Developers. It's quick & easy.

window.open popup from maximized parent page?

P: n/a
Bob
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.

function openMain()
{
window.open("main.jsp","main","width=200,height=32 5,location=0,status=0,scrollbars=0");
}
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

Sep 23 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
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...indow.open#FAQ

function openMain()
{
window.open("main.jsp","main","width=200,height=32 5,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..._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
--
remove blah to email me
Sep 23 '05 #2

P: n/a
Bob
I believe I have been misunderstood (partly due to lack of information
provided by me). The webpages I am working on is an internal JSF
application that I am creating. I am wanting to emulate as close as
possible a fat client application that was written in PROGRESS. This
application has a main menu (5 or 6 buttons) that opens up and remains
open while the user is using this "application suite". I am opening
this main menu page (restricted size) from a main application index
page. And this is where my question lies....

Scenario 1:

When the INDEX page is maximized and the link that opens the MAIN menu
page (via the javascript function about) is clicked, the MAIN page
opens maximized as well.

Scenario 2:

Similar to above, however when the INDEX page is not maximized (ie:
windowed) and the link that opens the MAIN menu page is clicked, the
MAIN page opens to correct size that is specified in the window.open
statement.

Now, scenario 2 is the desired effect, but I also need scenario 1 to
also open in the appropriate smaller window size, even if the INDEX
page is maximized.

I understand that popups are not good general practice web development
techniques, however like I stated before, this a company internal
application that is to mirror a fat client, thus the need/desire to
limit resizing, status bars, toolbars, location bars, etc. I have been
to many sites in the past where a popup window is opened at a smaller
size, even if the page is maximized. If someone could please explain
to me how I can achieve this I would greatly appreciate it. And if it
is not possible, please explain an alternative.

All help is greatly appreciated as this is a semi-learning project for
me.

Thank you!

Sep 23 '05 #3

P: n/a
Lee
Bob said:
I understand that popups are not good general practice web development
techniques, however like I stated before, this a company internal
application that is to mirror a fat client, thus the need/desire to
limit resizing, status bars, toolbars, location bars, etc.


Trying to make a web application look and feel like a legacy
application is almost always a bad idea. Your current users
may be used to the old application, but they're probably also
used to how well-designed web applications work, too, and
sooner than you can believe, they're going to start complaining
because the interface doesn't work the way they expect a web
application to work.

Sep 23 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.