SitePoint Sponsor |
|
User Tag List
Results 1 to 2 of 2
-
Jan 12, 2003, 03:59 #1
- Join Date
- Jan 2003
- Posts
- 1
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
How can I control the window size and button status when the page load.
Hi,
A question from a newbie.
I need a page load with windows size in 640 x 480 and without any button bar/status bar. I know I can do that make javascript code on the original page link. However, I can't edit source from the client.
So, is it possible to make it happen when the page load?
Thank for your help in advanced.
-
Jan 12, 2003, 09:45 #2
- Join Date
- Dec 2002
- Posts
- 8
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
I'm pretty sure there's an easier way to do this, and to be honest, I took this from another site but I wan't to be able to give a helping hand so here it is.
Within the <HEAD> and </HEAD> tags.
PHP Code:<script language = "JavaScript">
<!--
function openWin( windowURL, windowName) {
screenW = screen.availWidth;
screenH = screen.availHeight;
if (document.all || document.getElementById){
popWidth = 640;
popHeight = 480;
} else if (navigator.appName == "Netscape" && (navigator.appVersion.indexOf("PPC") != -1)) {
popWidth = 640;
popHeight= 480;
}else{
popWidth = 640;
popHeight = 480;
}
window.open('[b]ENTER PAGE URL HERE[/b]','theWindow','width=' + popWidth + ',height=' + popHeight + ',top=' + topPos + ',left=' + leftPos + 'toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
}
function openMan (URL) {
window.open(URL, 'theWindow', 'width=640,height=480,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0');
}
//-->
</script>
PHP Code:onload="openWin()"
I think there's a lot of stuff there thats not needed but i think its pretty obvious what that is. Well, depends if your bothered about Netscape or notLast edited by one-x; Jan 12, 2003 at 09:50.
one-x
"Simplicity is the key to all things great"
Bookmarks