
Originally Posted by
Aidanx
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=0,width=1032,height=746,left = 387,top = 259');");
}
Im using the above script on my website
Ick.
Assuming you don't need to reference the window in code (which that function makes rather difficult anyway, at least use:
Code:
function popUp(uri) {
window.open(uri, '_blank', 'scrollbars,resizable');
}
[visitors click button and it opens a window with my website on it].
That's the idea, but not necessarily the reality. You are aware that some visitors will indiscriminately disable pop-ups entirely, or those pop-ups will open as tabs ignoring your specified size and location.
Does anyone know how to set a standard so that the page resizes to fit their window to avoid any problems with different screen resolutions?
Ensure that the window is scrollable and resizeable, and don't specify any dimensions or position. Allow the window manager to do its job and create windows in a predictable or desirable manner. Better yet, don't create a new window at all, if you can help it.
Bookmarks