I have tried window.open()
and resizeTo(screen.width,screen.height)
but it is not opening in maximize view.
Please help with the relevant code.
I have tried window.open()
and resizeTo(screen.width,screen.height)
but it is not opening in maximize view.
Please help with the relevant code.
you can resizeTo()
only the window, that was created by window.open()
. First of all you should create and write to any var your window instance. And after that you can use its methods. Here is an example:
myExternalWindow = window.open("http://myurl.domain", "myWindowName", "resizable");
myExternalWindow.resizeTo(screen.availWidth,screen.availHeight);
Good luck!
Try window.open with screen.availHeight / screen.availWidth.
e.g.
window.open(src, "newWin", "width="+screen.availWidth+",height="+screen.availHeight)
The size of the window (I think you mean a popup window) you'll open can be set through the attributes width and height like below:
<a href="your-http-address.php" onclick="window.open(this.href,'targetWindow',
'toolbar=no,
location=no,
status=no,
menubar=no,
scrollbars=yes,
resizable=yes,
width=your_width,
height=your_height');
return false;">Open PopUp Window</a>
Where the placeholder your_width and your_height specify the popup dimensions. To make the popup cover the entire screen dimensions, just use screen.availWidth and screen.availHeight.