Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Can I change a non-resizable existing browser window with Javascript to be resizable?

Simple question, I have a window that was opened with this code

window.open(URL, windowName, 'resizable=no');

I know I can control size and position programmatically after it's loaded but how do I make it simply reziable again? is there any way to override it?

(NOTE: I have no access to modify the opening code, but have full access to the child window code)

like image 976
Eran Medan Avatar asked Aug 10 '11 17:08

Eran Medan


People also ask

How do I change the size of my browser window in HTML?

The resizeTo() method is used to resizes a window to the specified width and height. Parameter Values: width: Sets the width of the window, in pixels. height: Sets the height of the window, in pixels.

How do I stop a browser window from resizing after a specific size?

Prevent Browser Resize Css CSS can be used to prevent browser resizing. By using the max-width property, you can set a maximum width for the browser window. If the browser window is resized to be smaller than the max-width, the browser will automatically adjust the size of the elements on the page.


1 Answers

A hack can be this:

window.open(window.location.href, document.title, 'resizable=yes');
window.close();

but it cause your window open a new window and close itself that is not a good UX

like image 154
Mohsen Avatar answered Oct 22 '22 13:10

Mohsen