Your question is vague so I try to help with some examples that may be related to your problem.
If you need to get the size of the browser window using JavaScript, here is an example:
function getClientSize() {
var width = 0, height = 0;
if(typeof(window.innerWidth) == 'number') {
width = window.innerWidth;
height = window.innerHeight;
} else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
width = document.documentElement.clientWidth;
height = document.documentElement.clientHeight;
} else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
width = document.body.clientWidth;
height = document.body.clientHeight;
}
return {width: width, height: height};
}
To programmatically detect resizing of the browser window, attach a listener to the window.onresize event. Note that the following simplified example doesn't care if there already is a listener attached (use addEventListener/attachEvent as appropriate instead):
window.onresize = function() {
var size = getClientSize();
alert("Width: " + size.width + ", Height: " + size.height);
}