I have a little problems and was wondering anyone can help.
In my xml page:
onload="new_page('&base.uri;'), window_size();">
in my javascript file:
function window_size() {
height = screen.availHeight - 25;
width = screen.availWidth - 10;
//dump("*** WINDOW SIZE IS " + height + " : " + width + "***\n");
window.resizeTo(width, height);
}
I have this page is currently set at 800x600 resolution, smaller than the desktop resolution of 1024x768. What I want is to make the page load dead in center center and not floating at top left as it currently is.
I experimentt with the window.moveBy and window.moveTo() function but these are only relative guess and not auto-detect to dead center, doesn't matter what resolution i'm currently running. I'm thinking there must be some kind of javascript arithmetic that let you do this, but haven't found a solution to do so. Does anyone have epxerience in this before and have a solutions? I would be very appreciated.
Thank you.
In my xml page:
onload="new_page('&base.uri;'), window_size();">
in my javascript file:
function window_size() {
height = screen.availHeight - 25;
width = screen.availWidth - 10;
//dump("*** WINDOW SIZE IS " + height + " : " + width + "***\n");
window.resizeTo(width, height);
}
I have this page is currently set at 800x600 resolution, smaller than the desktop resolution of 1024x768. What I want is to make the page load dead in center center and not floating at top left as it currently is.
I experimentt with the window.moveBy and window.moveTo() function but these are only relative guess and not auto-detect to dead center, doesn't matter what resolution i'm currently running. I'm thinking there must be some kind of javascript arithmetic that let you do this, but haven't found a solution to do so. Does anyone have epxerience in this before and have a solutions? I would be very appreciated.
Thank you.