Welcome to WebmasterWorld Guest from 54.162.239.134

Forum Moderators: incrediBILL

Message Too Old, No Replies

Website window resizing

     
12:08 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Hi,
I've created a HTML based website using IFRAMES and was wondering whether there was a command to open the site in a specific size window.
On the members page I already have the following:

<a href= "#" onClick="window.open('members/member.htm','Max', 'toolbar=no,width=320,height=400,left=500,top=200, screenX=500,screenY=200,status=no,scrollbars=no, resize=no');return false"><font size="2" face="Arial, Helvetica, sans-serif"><b>LINK</b></font></a>

I want something like this for the main site. I know I can create an index.htm with a link to the actual site to open in a new window, but I was wondering if you could put something in the <HEAD> to auto-resize the current window straight away?

Hope this makes sense lol. Thanks in advance.

3:38 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Change the browser windows size automatically, tsk, tsk, tsk! ;)

I know it's tempting to use methods to make sure your site is seen at its best. And, what you want to know about can be done. But, it's normally not a good idea to change the visitor's browser window without some sort of choice on their end. Many people like their browser window just the way it is, others like to always browse at full screen, and others carefully size their browser window to a particular size to fit with other open windows/applications. This means that a good portion of people will be pretty upset if your site simply changes their browser window size without their approval. Not to mention which, Mozilla FireFox has features that prevent javascripts from resizing the browser window anyway, which is a choice I always turn on. So some visitors will see your site how they want to see it regardless of what tricks you use to resize it.

With that said, it is possible to do what you're suggesting. I don't know how myself, but if you're really set on doing this, you should try searching some of the script libraries, like javascriptsource.

Have you tried creating a fluid design, that will work and look good for all screen resolutions and sizes? That's really what many consider the best approach.

4:43 pm on Jun 24, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Also, idyll, remember that monitors are set diffrent resolutions. If you set the window size at 640x480, then your page is going to be lost on a screen with 1280x1024 resolution.

On the other hand, a window sized at 1000x1000 is going to be difficult to read, because of the scroll bars, at a resolution of 800x600.

Or users might want to view your site using a mobile phone.

Anyway, as MatthewHSE points out, users resize windows, etc if they don't like what they get. Go with his advice and use fluid design.

10:37 pm on Jun 24, 2004 (gmt 0)

10+ Year Member



Also keep in mind that many browsers (Mozilla-based browsers, for example) have security options to disable window resizing.
8:33 am on Jun 25, 2004 (gmt 0)

10+ Year Member



Cheers for the suggestions everyone. I'll look into how to convert my site into fluid design :D
10:51 pm on Jun 25, 2004 (gmt 0)

10+ Year Member



I dont know if this will help but when I use JavaScript I resize my window using the following....

<SCRIPT LANGUAGE="JavaScript">
function Offer() {
props=window.open('http://www.website.com', 'Welcome', 'toolbars=0, scrollbars=1, location=0, statusbars=0, menubars=0, resizable=1, width=800, height=600, left = 0, top = 0');
window.focus();
}
</script>

If you want a pop-up instead of a pop-under just remove the line:
window.focus();
If you want to close the original window and have just one window open you can use the me.close I think... little rusty on that so you might want to look it up.

Kimberly

<Sorry, no personal URLs. See TOS [webmasterworld.com]>

[edited by: tedster at 11:21 pm (utc) on June 25, 2004]

11:10 pm on Jun 25, 2004 (gmt 0)

10+ Year Member



another problem with page exploder scripts is that they can bbscure the vertical scroll bars if the user is running aol.

We run a very technical, esoteric site and AOL is actually one of our most popular referrers.

 

Featured Threads

Hot Threads This Week

Hot Threads This Month