Hi, is there a code out there that can do this.
I type my domain name into the browser and the page automatically resizes itself to a specified height and width in pixels.
| SitePoint Sponsor |




Hi, is there a code out there that can do this.
I type my domain name into the browser and the page automatically resizes itself to a specified height and width in pixels.
Animated Chatrooms - www.121chatrooms.net


yup
change: screen.availWidth,screen.availHeight to the height and widthCode:self.moveTo(0,0); self.resizeTo(screen.availWidth,screen.availHeight);
change: 0,0 to where you want it on the page
Think about it carefully though as it really annoys visitors when their browser gets changed without warning - especially if you have many tabs open.
Mike Swiffin - Community Team Leader
Only a woman can read between the lines of a one word answer.....
I started out with nothing... and still got most of it left!




I have added the code and modified the dimensions but when i view the site the page just shakes a little and dosnt resize, you can view it at http://www.121chatrooms.net
Animated Chatrooms - www.121chatrooms.net




i have tried viewing the page in the latest internet explorer and firefox
Animated Chatrooms - www.121chatrooms.net




Ok i am using the code <body onload="moveTo(306,150); resizeTo(1024,600);"> and it works. One more question can i disable the page from being resized for all browsers
Animated Chatrooms - www.121chatrooms.net




can anybody please help me?
Animated Chatrooms - www.121chatrooms.net
I think you should try using a javascript link in one page <a href="javascript:testJscript();"> link</a>
to call this function in the header..
function testJscript () {
window.open("Test_Javascript_Window.html", "jstest", "height=600,width=800,channelmode=0,dependent=0,dir ectories=0,fullscreen=0,location=0,menubar=0,resiz able=0,scrollbars=0,status=0,toolbar=0");
}
Hope it will help you.




thats good, but can we modify something so when the page loads it automatically loads the testJscript link inside the same page and resizes it?
Animated Chatrooms - www.121chatrooms.net




this is my code now:
Code:<script type="text/javascript"> function testJscript () { window.open("a.htm", "jstest", "height=600,width=800,channelmode=0,dependent=0,directories=0,fullscreen=0,location=0,menubar=0,resiz able=0,scrollbars=0,status=0,toolbar=0"); } </script> <body onload="javascript:testJscript();"></body>
Animated Chatrooms - www.121chatrooms.net
Bookmarks