0

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.

treasureireland
  • 87
  • 2
  • 3
  • 10

1 Answers1

0

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.

Halcyon
  • 57,230
  • 10
  • 89
  • 128
  • It needs to be done with JavaScript, as its a popup window that is being launched. So basically, the user cant see a video until they are logged in, but all the videos are different sizes, and the login panel is 800,600. So thats why I need it to re-size to above the min requirements of 800,600 but keeping the aspect ratios. – treasureireland Feb 25 '13 at 17:21
  • This sounds very strange to me. Popups are no longer a _modern_ way of working with the web, most people expect tabs. If you're doing something with video people will want a 'fullscreen' option. The rest is just templating/stylesheets. – Halcyon Feb 25 '13 at 17:26