473,837 Members | 1,541 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

resize browser window on load

how would i resize a browser window to a specific size as the page loads,
using html or javascript

Jul 23 '05 #1
25 19985
On Mon, 6 Sep 2004 17:35:17 +0800, chris wrote:
how would i resize a browser window to a specific size as the page loads,
using html or javascript


Why? What is in the pages?

Most of the time it is better to design a
page that fits any screen and let the user
retain control of the size themselves.

Please note that cross-posting to three groups
is generally frowned upon, though I note that
you were unsure which group was best and
did not commit the 'sin' of multi-posting..

I will set the Follow-Ups to the best group,
should you decide to do such a thing,
comp.lang.javas cript.

(While the HTML folks might be more aware of
how to make a page 'squeezy', the JS guru's
are certainly familiar with it.)

--
Andrew Thompson
http://www.PhySci.org/ Open-source software suite
http://www.PhySci.org/codes/ Web & IT Help
http://www.1point1C.org/ Science & Technology
Jul 23 '05 #2

"chris" <so*****@here.c om> wrote in message
news:41******** @funnel.arach.n et.au...
how would i resize a browser window to a specific size as the page loads,
using html or javascript


Leave the user's window alone.
It might be your website, but it is their computer.

-Karl
Jul 23 '05 #3
"chris" <so*****@here.c om> wrote in message
news:41******** @funnel.arach.n et.au...
how would i resize a browser window to a specific size as the page loads,
using html or javascript


<html>
<head>
<title>resizeto .htm</title>
</head>
<body onload="moveTo( 0,0); resizeTo(400,30 0);">
</body>
</html>
Jul 23 '05 #4

"McKirahan" <Ne**@McKirahan .com> wrote in message
news:nK%_c.2530 41$8_6.236481@a ttbi_s04...
"chris" <so*****@here.c om> wrote in message
news:41******** @funnel.arach.n et.au...
how would i resize a browser window to a specific size as the page loads, using html or javascript


<html>
<head>
<title>resizeto .htm</title>
</head>
<body onload="moveTo( 0,0); resizeTo(400,30 0);">
</body>
</html>

Congratulations . You've shown the OP a great way to confuse and annoy
visitors.

-Karl
Jul 23 '05 #5
Karl Groves wrote:
"McKirahan" <Ne**@McKirahan .com> wrote in message
news:nK%_c.2530 41$8_6.236481@a ttbi_s04...
"chris" <so*****@here.c om> wrote in message
news:41****** **@funnel.arach .net.au...
how would i resize a browser window to a specific size as the page
loads,
using html or javascript


<html>
<head>
<title>resize to.htm</title>
</head>
<body onload="moveTo( 0,0); resizeTo(400,30 0);">
</body>
</html>


Congratulations . You've shown the OP a great way to confuse and annoy
visitors.


Not only that, but a method that fails in some scenarios.

--
Randy
comp.lang.javas cript FAQ - http://jibbering.com/faq
Jul 23 '05 #6
"Karl Groves" <ka**@NOSPAMkar lcore.com> wrote in news:chi1uq$sru $1@ngspool-
d02.news.aol.co m:

"McKirahan" <Ne**@McKirahan .com> wrote in message
news:nK%_c.2530 41$8_6.236481@a ttbi_s04...
"chris" <so*****@here.c om> wrote in message
news:41******** @funnel.arach.n et.au...
> how would i resize a browser window to a specific size as the page loads, > using html or javascript


<html>
<head>
<title>resizeto .htm</title>
</head>
<body onload="moveTo( 0,0); resizeTo(400,30 0);">
</body>
</html>

Congratulations . You've shown the OP a great way to confuse and annoy
visitors.


So you think we should hide information from them?

The next thing you know, we'll stop teaching chemistry in high school, lest
anybody figure out how to make a bomb.
Jul 23 '05 #7
"chris" <so*****@here.c om> wrote in news:41******** @funnel.arach.n et.au:
how would i resize a browser window to a specific size as the page
loads, using html or javascript


The real question is, how could you design your page better so it doesn't
need this behavior. After all, you can't do what you want on many
browsers, including ones with javascript selectively turned on.
Jul 23 '05 #8
On 6 Sep 2004 17:13:40 GMT, Sam Hughes <hu****@rpi.edu > wrote:
"Karl Groves" <ka**@NOSPAMkar lcore.com> wrote in
news:chi1uq$sru $1@ngspool-
d02.news.aol.co m:
Congratulations . You've shown the OP a great way to confuse and annoy
visitors.


So you think we should hide information from them?

The next thing you know, we'll stop teaching chemistry in high school,
lest
anybody figure out how to make a bomb.


There's a difference, in my opinion.

First, if we teach the chemical method of producing a huge explosion, we
also must responsibly mention that it's probably not a good idea to do
this in your basement or classroom.

Second, and I've used this analogy before, if someone wrote to you asking
what the best methods of suicide were, and it was clear from their message
that the question was not merely academic, I'm sure you'd be reluctant to
entertain the idea of suicide with this person. Rather, I'd hope you'd
attempt to help them out of their current situation toward a more healthy
one.

When people ask questions which are not answerable directly without ending
up as suporting poor practice, and we do so anyway, we're advising someone
to do something which is bad for the web.

This is why so many questions here are answered with "Why do you want to
do this? It's going to lead to no good." Because it's the only responsible
answer.
Jul 23 '05 #9
Neal <ne*****@yahoo. com> wrote in
news:op******** ******@news.ind ividual.net:
When people ask questions which are not answerable directly without
ending up as suporting poor practice, and we do so anyway, we're
advising someone to do something which is bad for the web.

This is why so many questions here are answered with "Why do you want
to do this? It's going to lead to no good." Because it's the only
responsible answer.


But alas, in this case, other people have already given that aspect of the
answer.
Jul 23 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
3515
by: Clinton Goff | last post by:
I am attempting to write a javascript app that will open a second browser window, load a url, such as www.google.com (foreign url) and perform a <File-Save As> function on that window. I am able to do this with opening a second window that loads a local file, but I get an Access Denied error when I attempt this with a different website. Is there not a command in javascript that will allow me to open a webpage and perform this function? ...
10
2127
by: Rob | last post by:
Hi, I have some problems resizing a html page when it is loaded. I want the page to resize to the screensize. The following snipped of code (see below) works perfect on my Windows NT. but not on my Windows 98. Windows 98 with Ms Explorer 6.0.2800.1106IS Update versions:; SP1; q313829; Q328970; Q330994; Q813389l Q818529; Q824145;
8
8906
by: jrefactors | last post by:
I want to maximize the browser window when I open a new window. Now I do the following, but different monitor size will yield different width and height values. window.open('index.jsp',myform.target,'toolbar=no,menubar=no,resizable=yes,scrollbars=yes,width=800,height=600'); Any ideas? please help. thanks!!
4
1852
by: jef | last post by:
I have an Intranet application that is targeted to IE browsers only. It is also designed explicitly to fit an 800x600 window. That said, I wish to ensure that the browser window sizes appropriately when they log in. I'm using this right now: <HEAD> <title>My Login Page</title> <meta content="Microsoft Visual Studio .NET 7.1" name="GENERATOR"> <meta content="Visual Basic .NET 7.1" name="CODE_LANGUAGE"> <meta content="JavaScript"...
33
4090
by: randau | last post by:
Linking to a Targeted Browser Window I'd like to open reference links to other web sites in a separate browser window from the browser window hosting my own web site pages. The Link Target reserve word "_blank" opens a blank new browser window for every link, which can sometimes result in a lot of open browser windows. Is there no way to "reuse" a previously linked browser window and have it load the new web page in Foreground
2
1349
by: andy.jones | last post by:
Hi I'm new to Javascript and wonder if anyone can give me some help? Im using document.documentElement.clientWidth to get the width of the users browser and it works fine so long as the users don't resize it. However, if the user re sizes it and then refreshes it , everthing is correct).
2
2068
by: chowdary0783 | last post by:
Hi every one, I working on an web application in which clicking a button opens another window which will be dynamically populated with some data. Amount of data cannot be decided. I just want to fit the window size to the content of the data. Any suggestiosn?? Thanks a lot.
0
9839
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
10871
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10621
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10268
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9396
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7806
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6998
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5668
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
3
3123
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.