Fix window size on load (Full Version)

All Forums >> [Web Development] >> Microsoft FrontPage Help



Message


Mosky -> Fix window size on load (10/18/2002 19:53:46)

Hi, can anybody help me to fix the window size of my index.htm when opened (NOT from another page, NOT from any link )?




Seventh -> RE: Fix window size on load (10/18/2002 20:40:41)

Not sure what you' re asking.

Do you want it to open at a certain size like 400 X 600? Do you want it to sit in the middle of the screen? Do you want it to adjust to the resolution of the visitors screen?

And a url would help a great deal.[;)]




Little Man -> RE: Fix window size on load (10/18/2002 21:10:27)

Seventh,

In perusing the forum, I found your response interesting. I have struggled with how to position my page on visitors screens. I have a 17" monitor at home, but a meager 12" screen at work. When I work on my company' s Web at work, I always have to preview it with a grain of salt - knowing it will look differently at home.

Based on your response above, how can I adjust my Web to be centered or to fit the viewer' s screen? What options exist?

My site is in my signature. Thanks for your help!




Mosky -> RE: Fix window size on load (10/18/2002 21:32:57)

Yes Seventh, a fixed size may be any like 400 X 600, center (or somewhere else) on the monitor. Here is my question: I can open a link on a pop-up window with fixed size, but how can I open the index.htm (the 1st file on the web) with a fixed size? Thanks for yr considerations.




Seventh -> RE: Fix window size on load (10/19/2002 1:20:19)

quote:

In perusing the forum, I found your response interesting.
Thanks, I try to be helpful and interesting. Makes the kids laugh as well.[:p]

quote:

I have struggled with how to position my page on visitors screens.
Don' t. This is much easier.

quote:

I have a 17" monitor at home, but a meager 12" screen at work.
Whoa, elementary school Mac flashback. In all honesty, the norm is about 15" - 17" monitors. Though I have three 21" and one 52" projection monitor.

quote:

When I work on my company' s Web at work, I always have to preview it with a grain of salt - knowing it will look differently at home.
I' m sure. But your target audience probably has a much better monitor with a higher resolution. The above link will help you with this as well.

quote:

Based on your response above, how can I adjust my Web to be centered or to fit the viewer' s screen? What options exist?
I' ll answer this in three parts:

Part 1. To adjust your Web Site to fit the screen of the visitor you can design using %' s in your tables. It' s not the most accurate way, but it does allow for screen resizing. The way you have the site now accomplishes that. Though you may not see it this way, regardless of the screen resolution your site will always be centered in the visitor' s browser.

Part 2. There are several options (Javascript and Flash are the most used), but the real question should be functionality. What purpose would you serve by resizing your visitor' s screen size without their knowledge. I would certainly be pissed off because it causes every other window I open afterwards to fit into that same amount of space. Here' s a link that provides you with some options. Take this with a grain of salt. IRT.org

Part 3. There are also ways (with Javascript) to allow a certain template to load based on their resolution. It adds more work to the development stage but can be valuable for something like an Extranet (a link between the intranet and the web). In this case, the intranet usually has smaller requirements like one (1) browser, (1) resolution size, (1) set of users. But if someone on the WWW wanted to access certain portions of the intranet via permission, you would need to allow for the differences in browser and resolution.

And before anyone comments on the intranet statement, trust me, I know it' s a lot more complicated than that. I' m going for brevity here.




Seventh -> RE: Fix window size on load (10/19/2002 1:24:52)

Mosky,

Add this to your body tag:

onload=" window.resizeTo(655,450)"

655 is the width
450 is the height

And I believe this works only with Netscape 4 and higher & IE 4 and higher. Take that into account.




Mosky -> RE: Fix window size on load (10/19/2002 8:33:36)

Sorry, if I did something wrong but it did not work for me, I inserted the code onload=" window.resizeTo(655,450)"
In the body tag and this code appeared in the normal page and no change affected the window size.

Here it is

members.aol.com:/mocchau3000/onload.htm




Mosky -> RE: Fix window size on load (10/19/2002 8:43:53)

Sorry, this is the link to my test page
Here it is: test OnLoad




Little Man -> RE: Fix window size on load (10/19/2002 9:42:20)

Dear Mosky and Mr. Seventh (are you related to 7 of 9?),

Seventh - Can you explain the 96' s thing? Are you talking table width %? Thank you so much for your thorough help!

Mosky - sorry for butting in on your query. I hope your site works out for you!

bryan




Gil -> RE: Fix window size on load (10/19/2002 10:47:59)

quote:

Sorry, this is the link to my test page


The code is not inside the <body> tag it is in the body of the document.
Like: <body onload=" window.resizeTo(655,450)" >

That said - Anytime I arrive at a page and the author has taken away control of MY browser I am gone never to return!




Mosky -> RE: Fix window size on load (10/19/2002 10:56:35)

Thanks Bryan Stone and Gil,
It works now.
Thanks again.




Seventh -> RE: Fix window size on load (10/19/2002 19:01:54)

quote:

The code is not inside the <body> tag it is in the body of the document.
Like: <body onload=" window.resizeTo(655,450)" >

Sorry to say this, Gil, but I think you just contradicted yourself. According to the WC3 <BODY> is a tag.[:j] And you simply put the information I gave into the <BODY> tag.




Seventh -> RE: Fix window size on load (10/19/2002 19:06:11)

quote:


Original: Bryan Stone

Seventh - Can you explain the 96' s thing? Are you talking table width %? Thank you so much for your thorough help!

You lost me on that one, Bryan.




Gil -> RE: Fix window size on load (10/19/2002 21:10:40)

quote:

Sorry to say this, Gil, but I think you just contradicted yourself. According to the WC3 <BODY> is a tag. And you simply put the information I gave into the <BODY> tag.


Huh? Right you postred the code and told Mosky to place it in the body tag. He had it in the body of the document, like this: <body>onload=" window.resizeTo(655,450)"
I showed him the correct way, like: <body onload=" window.resizeTo(655,450)" >

How is that a contradiction?




Seventh -> RE: Fix window size on load (10/19/2002 22:03:39)

First, if I came across as insulting your understanding of HTML, I apologize. That was not my intention. So let' s try and keep this as an educational review for those who may not have a clear understanding of my explatnation. Agreed? Then let' s begin.

#1. Definition of a tag:

A tag is simply a set of containers used to denote/mark the various elements in an HTML document for your browser. HTML tags consist of a left angle bracket (<), a tag name, and a right angle bracket (>). Tags are usually paired (e.g., <H1> and </H1>) to start and end the tag instruction.

#2. Definition of the BODY element:

The second--and largest--part of your HTML document is the body, which contains the content of your document (displayed within the text area of your browser window). This information, the content, is placed inbetween the <BODY></BODY> tags.

Some elements may include an attribute, which is additional information that is included inside the start tag (e.g., <BODY onload=" window.resizeTo(655,450)" >).

What I specifically stated was that the onload feature should be added to the body tag Not after, not before, but in.
quote:

Add this to your body tag:

onload=" window.resizeTo(655,450)"

655 is the width
450 is the height


Where does the contradiction part come into play?
You said:
quote:

The code is not inside the <body> tag it is in the body of the document.

First, you did not clarify as to whom your were making a reference to. I responded as if you were responding to my post. But I now think you were referring to Mosky' s first test page using the information I provided.

Second, my instructions, again, were to place the information into the body tag. Your example of what I stated was what activated my response. It was exactly what I instructed Mosky to do.
quote:

Like: <body onload=" window.resizeTo(655,450)" >

Where I may have made a mistake is in assuming Mosky would know the difference between a body tag and content within the body element. My assumption was wrong.

All in all this was simply a misunderstanding on both our parts. So I apologize for my part in the confusion. I will strive to provide examples in future posts.

Still friends, Gil?[;)]




Spooky -> RE: Fix window size on load (10/19/2002 22:09:06)

I think you have misunderstood Gil, his post quite clearly quotes the error that Mosky made?
It was simply an editing error that Gil quite happily corrected and was not aimed at you in any way [:)]




Seventh -> RE: Fix window size on load (10/19/2002 22:16:53)

Spooky,

We must have posted at the same time. Hopefully, I have corrected that issue.




Gil -> RE: Fix window size on load (10/19/2002 23:37:33)

quote:

Still friends, Gil?


Sure, a little misunderstanding of the wording in a post is to be expected once in a while.


I have to admit, it may be the way I worded my post: No, I didn' t say I was respomding to Mosky - I assumed it would be clear - my bad.
Also, I didn' t say body element, asuming anyone would know the body of the document was the actual body element.

I guess what is so ironic is that if any web developer pulls this on me I' ll leave and never return - it' s my browser and I' ll control the window size thank you. [8D]

Cheers...




Seventh -> RE: Fix window size on load (10/20/2002 1:01:44)

quote:

I guess what is so ironic is that if any web developer pulls this on me I' ll leave and never return - it' s my browser and I' ll control the window size thank you.

I agree. If you resize my browser, open up more than (1) popup on entry or exit, go full screen or don' t let me know when a link is a .pdf or .zip, I' m gone! [:@]




Little Man -> RE: Fix window size on load (10/20/2002 7:28:34)

Whew! Step away for a day and look what happens to a thread. I' m worn out getting caught up. That said, it was actually quite helpful hammering out a better understanding of HTML tags and body.

Seventh - On the whole 96' s thing, I feel like quite the idiot! You wrote:
quote:

Part 1. To adjust your Web Site to fit the screen of the visitor you can design using %' s in your tables.


On my screen, the % looked like a 96 with a quick scan.

So, set the table widths using percentages instead of pixels? How does doing so keep the content centered on the individual viewers screen or adjust to their screen? Any recommended % values to try first?




Seventh -> RE: Fix window size on load (10/20/2002 8:06:02)

Bryan, I' ll try to answer your questions.
quote:

So, set the table widths using percentages instead of pixels?

It' s actually a matter of preference and, in some cases, design. But what I' ve seen others use it for is to allow for the content(s) of the page to adjust ' dynamically' to a visitor' s monitor regardless of their resolution. Kind of like this forum or OutFront' s home page.

If you go up to the right corner of your browser (while you' re reading this message) and click the middle button (which in IE is restore and looks like one window), you' ll be able to drag the right bar to say, the middle of the screen. Pay attention to how the content adjusts to the width of the browser window. That' s what percentages usually allow you to do.

quote:

How does doing so keep the content centered on the individual viewers screen or adjust to their screen?

This depends on 1) your margins and 2) your percent settings. If your margins are (0) and your main table is set at a width of 100% (not 96[:)]), the page will fill up the browser window from left to right.

quote:

Any recommended % values to try first?

Again, it depends on what you' re trying to achieve. Let' s say you have three columns. You want the left and right column to be smaller than the middle column. Well, you create a table with (3) columns which will now become cells in a table.

The left column is the left cell in the table.
The right column is the right cell in the table.
The middle column is the middle cell in the table.

You can simply click in the left cell, select cell properties, type in (25) in the width box, and make sure that percent is selected. Do the same thing for the right cell. Now, for the middle cell, type in (50) for the width and make sure you select percent. So, what do you have now?

Left Cell (width=25%)
Middle Cell (width=50%)
Right Cell (width=25%)

What does it mean? It now means that in relation to the visitor' s browser the Left Cell will take up 25% of the browser window, the Right Cell will take up 25% of the browser window, and the Middle Cell will take up 50% of a browser window. Giving you a total of 100% of the browser window.

It gets a little more complicated than this but this is just a basic example. You can also mix percentages with pixels, but that' s another book.

I probably should' ve just given you a link but I' m too lazy to search for it right now. You may want to check out the tutorials section at the top of this page.

I gotta go to sleep.






Little Man -> RE: Fix window size on load (10/20/2002 8:17:32)

Wow! That was extremely helpful! You have no idea. I feel like I just got lasic surgery for the web.

Based on some of your response times, I would say you should get some sleep.

Thank you again for your help! By the way, do you design and sell templates?




Seventh -> RE: Fix window size on load (10/20/2002 8:48:40)

quote:

Wow! That was extremely helpful! You have no idea. I feel like I just got lasic surgery for the web.

That' s what I' m here for.[;)]

quote:

Based on some of your response times, I would say you should get some sleep.

Hard to do. I' m nocturnal by nature. As far as response time, I have a T1 connection at home.

quote:

Thank you again for your help! By the way, do you design and sell templates?

You' re welcome. As far as the templates, I do design them and will be selling them in the near future. I' ll let you know.

Good night, or should I say good morning!




Mosky -> RE: Fix window size on load (10/20/2002 9:10:21)

Seventh,
Thanks, let me know of the templates too.




vai4me -> RE: Fix window size on load (5/29/2006 2:48:55)

Ok so I know this is a REALLY old post but I need some help with a related topic...

I currently have an embedded media player which opens into a new window fullscreened and set sized by javascript...the issue is when the window is minimized and then restored it is no longer the size I initially set it at...anyway to make it either resize itself upon restore? OR disable the minimize button altogether (not my more favorable choice)....thanks in advance...




vai4me -> RE: Fix window size on load (5/29/2006 14:26:38)

Ok so this is what I have done for now....

<body onMouseOver="javascript:self.resizeTo(335,190);">


This way when the mouse is over the page it will automatically resize and since I have noticed it opens fullscreen after restore this is almost instant.




Page: [1]

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition 2.4.5 ANSI
0.125