Hi all
I want to prevent users from resizing a screen to the extent that it mucks up my layout.
I have activated the window_onresize event, but, for some reason, the onresizeend event doesn't fire.
I can get round that but:
How do you reference the actual window size?
It seems obvious; window.width & window.height.
But that isn't available in the properties of the window, or the document.
The closest I found was window.screen.width but soon realised I had it wrong when it kept returning 1024 no matter what the window was like.
Now I can open a window with a set size and disable resize. But that runs foul of anti-popup software.
I could simply reset the window size and position on the open and resize event to cover the whole window, but I don't want to be that draconian.
This seems to me to be a relatively commonplace problem, but can find no reference to any way of getting round it.
Any help gratefully recieved.
I want to prevent users from resizing a screen to the extent that it mucks up my layout.
I have activated the window_onresize event, but, for some reason, the onresizeend event doesn't fire.
I can get round that but:
How do you reference the actual window size?
It seems obvious; window.width & window.height.
But that isn't available in the properties of the window, or the document.
The closest I found was window.screen.width but soon realised I had it wrong when it kept returning 1024 no matter what the window was like.
Now I can open a window with a set size and disable resize. But that runs foul of anti-popup software.
I could simply reset the window size and position on the open and resize event to cover the whole window, but I don't want to be that draconian.
This seems to me to be a relatively commonplace problem, but can find no reference to any way of getting round it.
Any help gratefully recieved.