473,418 Members | 1,605 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

window.open popup from maximized parent page?

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
3 3769
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: Randell D. | last post by:
Folks, I'm working on a contact name/address database whereby a slimed down list is shown in the main window. When a record is selected, the complete record is displayed in a new window via a...
9
by: Christopher Benson-Manica | last post by:
In some old Javascript we have, we try to determine whether the client is IE or Netscape (assume for the purposes of this question that the question can be resolved satisfactorily) and tailor the...
19
by: Darren | last post by:
I have a page that opens a popup window and within the window, some databse info is submitted and the window closes. It then refreshes the original window using window.opener.location.reload(). ...
14
by: D. Alvarado | last post by:
Hello, I am trying to open a window containing an image and I would like the image to be flush against the window -- i.e. have no padding or border. Can I make this happen with a single call to a...
1
by: Earl Teigrob | last post by:
I did a ton of searching to try and find a simple solution to this issue and finally wrote my own, which I am sharing with everyone. In my searching, I did find a very complete and robust solution at...
3
by: Aaron | last post by:
I am having a little difficulty with a relatively simple task. I have a parent webform. I have a javascript attribute added to a button to open a new window when clicked. The user fills in a...
4
by: Csaba Gabor | last post by:
Up until a few weeks ago, javascript code like window.open("http://mydomain.com", "windowName"); would always bring my new or reused window to the top, with focus. Lately, Firefox (Deer park...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.