Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > Setting initial page width

Setting initial page width
Thread Tools
Jacket
Mac Enthusiast
Join Date: Mar 2003
Location: Outside of Boston, MA
Status: Offline
Reply With Quote
Apr 19, 2003, 12:05 PM
 
I'm working on my website now in Dreamweaver.. I would like to set it so that when visitors come to my site that their web browser automatically sets the size of the window. does anyone know how to do this?
Another PC to PB17 Switcher
Became the proud new owner of a PB17 on 03/22/03
http://www.mattmargolis.com (Part of the Vast Right-Wing Conspiracy)
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Apr 19, 2003, 01:59 PM
 
That would be a javascript command (i don't know the syntax off hand, so will leave it as a research project for you). But be advised that some web browsers allow the user to turn off that "feature," so you cannot count on it always working. Good luck.
     
Millennium
Clinically Insane
Join Date: Nov 1999
Status: Offline
Reply With Quote
Apr 19, 2003, 02:08 PM
 
You would use a JavaScript function, attached to the body's onload event handler.

By the way, I strongly advise against doing this. There are few ways to alienate your users faster than taking over things like their browser window.
You are in Soviet Russia. It is dark. Grue is likely to be eaten by YOU!
     
godzookie2k
Mac Elite
Join Date: Oct 2000
Location: Baltimore, MD
Status: Offline
Reply With Quote
Apr 21, 2003, 08:20 AM
 
call the code below onLoad. (850, 700) is the size in pixels, change to whatever you want. FWIW this is a very bad idea to do onLoad. I'd recommend having a button that does it at the users request.

function resize()
{
window.resizeTo(850,700)
}
     
Jacket  (op)
Mac Enthusiast
Join Date: Mar 2003
Location: Outside of Boston, MA
Status: Offline
Reply With Quote
Apr 23, 2003, 01:29 PM
 
Originally posted by godzookie2k:
call the code below onLoad. (850, 700) is the size in pixels, change to whatever you want. FWIW this is a very bad idea to do onLoad. I'd recommend having a button that does it at the users request.

function resize()
{
window.resizeTo(850,700)
}
i don't see how this is such an alienating thing to do.
Another PC to PB17 Switcher
Became the proud new owner of a PB17 on 03/22/03
http://www.mattmargolis.com (Part of the Vast Right-Wing Conspiracy)
     
bens1901
Registered User
Join Date: Sep 2002
Location: New York City
Status: Offline
Reply With Quote
Apr 23, 2003, 04:13 PM
 
Originally posted by Jacket:
i don't see how this is such an alienating thing to do.
I would cast my vote as: using javascript to modify the window size is too intrusive. It could cause the User to feel out of control.

The perception of "computer controlled" probably comes from the OS that you have used in the past.

The Windows world of developers permits any program to "control" the mouse at certain times. For example, when doing a File Open from within an application, the mouse may be automatically moved to hover over the "ok" button of the File Open dialog.

Apple published many books that outlined how a Macintosh program should be programmed. One of these books focused entirely on Human-Computer Interaction. It explains that the computer program should never control the interaction items of the User, such as moving the mouse, resizing a window, etc.

See this web page, it's a small paragraph:
Apple - User Control Guideline

I personally agree with the Mac attitude. However, everyone views it differently. I have not heard of any "rule of thumb" regarding how this window-resizing is considered. Keep in mind that often a browser window is resized by a pop-up advertisement. This may cause the User to have a knee-jerk reaction to close the browser window.
     
Rainy Day
Grizzled Veteran
Join Date: Nov 2001
Location: Oregon
Status: Offline
Reply With Quote
Apr 23, 2003, 08:50 PM
 
I would cast my vote as: using javascript to modify the window size is too intrusive. It could cause the User to feel out of control.
And i'd cast my vote the same. This is why i've disabled that javascript function on my browser (and the ability to exercise that kind of control is one of the reasons i like iCab so much). Before that, i was always annoyed when a page was resized "for me." With iCab, i've disallowed not only that but also the opening of windows (i.e. pop-ups), moving windows, changing window stacking order, accessing history, hiding window toolbars and writing in the status line. All these things are too intrusive. If Safari offered this level of control, i might be inclined to use it more.

Apple published many books that outlined how a Macintosh program should be programmed. One of these books focused entirely on Human-Computer Interaction. It explains that the computer program should never control the interaction items of the User, such as moving the mouse, resizing a window, etc.
Ironically, Apple has violated many of its own guidelines in various aspects of MacOS X. Most notably in the Dock. In fact Tog (aka Bruce Tognazzini), who founded the Apple Human Interface Group and to whom we owe much of the consistency of the Macintosh user experience, wrote an article titled: Top 10 Reasons the Apple Dock Sucks, which addressed this issue. It should be noted, however, that this article was written circa 2001 and Apple has subsequently addressed some of Tog's criticisms.
     
daimoni
Occasionally Quoted
Join Date: Apr 2001
Location: San Francisco
Status: Offline
Reply With Quote
Apr 24, 2003, 06:43 PM
 
.
( Last edited by daimoni; Jul 10, 2004 at 10:32 AM. )
.
     
Jacket  (op)
Mac Enthusiast
Join Date: Mar 2003
Location: Outside of Boston, MA
Status: Offline
Reply With Quote
Apr 24, 2003, 10:20 PM
 
Originally posted by daimoni:
I wouldn't either... if I didn't care about my users.

How dare you assume that that the person visiting your little website wanted to change their browser window size.
a person's website is a creative expression... in many ways, a work of art, and the webmaster has every right to do what they can to have their website viewed in the manner they envision it to be.
Another PC to PB17 Switcher
Became the proud new owner of a PB17 on 03/22/03
http://www.mattmargolis.com (Part of the Vast Right-Wing Conspiracy)
     
Amorya
Mac Elite
Join Date: Mar 2001
Location: England
Status: Offline
Reply With Quote
Apr 26, 2003, 09:49 AM
 
Originally posted by Jacket:
a person's website is a creative expression... in many ways, a work of art, and the webmaster has every right to do what they can to have their website viewed in the manner they envision it to be.
And the user has every right to click the 'Back' button if they don't like how a site works

Amorya
What the nerd community most often fail to realize is that all features aren't equal. A well implemented and well integrated feature in a convenient interface is worth way more than the same feature implemented crappy, or accessed through a annoying interface.
     
   
 
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Top
Privacy Policy
All times are GMT -4. The time now is 02:34 PM.
All contents of these forums © 1995-2017 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.8 © 2000-2017, Jelsoft Enterprises Ltd.,