Just get the reference of the created window and adjust it height and width properties.
function myFunction() {
const win = window.open(
"https://www.w3schools.com",
"_blank",
"toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400"
);
win.height = 600;
win.width = 800;
}
I try to rezise windows browser with JS or Angular after opened, but i can find that looking for
step one
We have this function
function myFunction() {
window.open(
"https://www.w3schools.com",
"_blank",
"toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400"
);
}
step 2
when the window is open and the page is loaded I need that window resize to
width=800, height=600 with javascript or Angular, please no JQuery.
And I cant find some function that make do that.
Greatings | Thanks
EDIT and add details
Note: the window that open/contain window.open function, cant be modificated and doesn’t have reference like @Ashish Ranjan sais with win.width = 800;
so, this cant be solution:
function myFunction() {
const win = window.open(
"https://www.w3schools.com",
"_blank",
"toolbar=yes,scrollbars=yes,resizable=yes,top=500,left=500,width=400,height=400"
);
win.height = 600;
win.width = 800;
}
Reāsizing a window is often really annoying, especially given the very large screens some users use. Please consider usability very carefully before doing this.