0

I used the following js to pop-up a new window from original window:

oWin = window.open("PServlet?module=LoginHandler","_blank",
"directories=no,location=no,menubar=no,resizable=yes,status=yes,titlebar=yes,toolbar=no", 
false);

As you can see, I did not set the size or location of new window, But my test results is that the size of pop-up windows on every time was shown irregularly from the same size of original window, sometimes it is half, sometime it is full screen or partial size.

Everybody know what is reason? If I wouldn't change the JS, how can I let the pop-up window to be displayed in full screen in every times.

C.c
  • 1,905
  • 6
  • 30
  • 47
  • possible duplicate of [How to make in Javascript full screen windows (stretching all over the screen)](http://stackoverflow.com/questions/1125084/how-to-make-in-javascript-full-screen-windows-stretching-all-over-the-screen) – Shadow The GPT Wizard Oct 17 '11 at 14:52
  • Without specifying the width and height, it's up to the browser to decide. Most browsers will just use the last size used for the non maximized window. As you're after displaying it full screen, see the duplicate question. – Shadow The GPT Wizard Oct 17 '11 at 14:53

1 Answers1

1

http://www.javascript-coder.com/window-popup/javascript-window-open.phtml

function mypopup()
{
    mywindow = window.open("http://www.javascript-coder.com", "mywindow", "location=1,status=1,scrollbars=1,  width=100,height=100");
    mywindow.moveTo(0, 0);
}

For fullscreen, see here: http://javascript-array.com/scripts/window_open/

function popup(url) 
{
 params  = 'width='+screen.width;
 params += ', height='+screen.height;
 params += ', top=0, left=0'
 params += ', fullscreen=yes';

 newwin=window.open(url,'windowname4', params);
 if (window.focus) {newwin.focus()}
 return false;
}
Josh Simerman
  • 404
  • 3
  • 7