homepage Welcome to WebmasterWorld Guest from 54.161.220.160
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / HTML
Forum Library, Charter, Moderators: incrediBILL

HTML Forum

    
Website window resizing
idyll

10+ Year Member



 
Msg#: 8149 posted 12:08 pm on Jun 24, 2004 (gmt 0)

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.

 

MatthewHSE

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 8149 posted 3:38 pm on Jun 24, 2004 (gmt 0)

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.

TheDoctor

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 8149 posted 4:43 pm on Jun 24, 2004 (gmt 0)

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.

gmiller

10+ Year Member



 
Msg#: 8149 posted 10:37 pm on Jun 24, 2004 (gmt 0)

Also keep in mind that many browsers (Mozilla-based browsers, for example) have security options to disable window resizing.

idyll

10+ Year Member



 
Msg#: 8149 posted 8:33 am on Jun 25, 2004 (gmt 0)

Cheers for the suggestions everyone. I'll look into how to convert my site into fluid design :D

kvalentine

10+ Year Member



 
Msg#: 8149 posted 10:51 pm on Jun 25, 2004 (gmt 0)

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]

keypclkn

10+ Year Member



 
Msg#: 8149 posted 11:10 pm on Jun 25, 2004 (gmt 0)

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.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / Code, Content, and Presentation / HTML
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved