0
votes

So the window I am opening, does so as below:

<a href="javascript:openNamedWindow('/test/test.do', 'test',600,640);">test</a>

The page opens a login page which requires a minimum width of 800 and height of 600 in order to see all the content.

However once they have logged in, it then takes them to a information page, but the aspect ratio needs to stay the same as the original window that it was opened in (600,640).

Is there a way I can get javascript to resize the window, but keep the original aspect ratio, as long as its bigger than 800x600, if not resize to a ratio just over that dimension? (I dont want to specify the original launch size, as i want to use this code globally across this type of popup on the site).

Thanks.

1
Users generally do not like sites changing their browser window sizes for them. There may be many reasons for this, including accessibility issues. Don't do it. - Diodeus - James MacFarlane

1 Answers

0
votes

This is usually something you fix with a proper template/stylesheet.

Can you change the template so that it allows any aspect ratio?

Use margin: auto to center divs horizontally.

This should take away all window-size requirements.