473,386 Members | 1,793 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Using JavaScript to set the browser size

When I do website design I have my screen (on a PC) set for 1600 x
1200 or greater resolution so that I can have as many windows open as
I need and not have to flip between them. The issue I have is the the
IE7 window is never a consistant size because I resize it as I am
using it.

I would like to be able to open up a blank IE 7 window and have it set
to a specific size each time so that I can see the pages I am working
on in the same window size others use.

I know you can use JavaScript to set the size of a window that you
open, but I would like to be able to set the size of the browser to a
specific size. My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.

Any thoughts on how this can be done?

Bill H

Sep 15 '07 #1
7 5780
Bill H wrote:
I know you can use JavaScript to set the size of a window that you
open, but I would like to be able to set the size of the browser to a
specific size. My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.

Any thoughts on how this can be done?
a) Upload the HTML file to a remote Web server, and access it there.

b) Set up a local Web server (I recommend Apache 2.x), and access
the HTML resource there. Having a local server for Web development
is a Good Thing anyway.

BTW, something is wrong with your mailbox:

| 220 www.ts1000.us ESMTP Sendmail 8.10.2/8.10.2; Sat, 15 Sep 2007 13:44:36
| -0400
| [...]
| 553 5.3.0 <bi**@ts1000.us>... No such user here
HTH

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Sep 15 '07 #2
On Sep 15, 2:00 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
Bill H wrote:
I know you can use JavaScript to set the size of a window that you
open, but I would like to be able to set the size of the browser to a
specific size. My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.
Any thoughts on how this can be done?

a) Upload the HTML file to a remote Web server, and access it there.

b) Set up a local Web server (I recommend Apache 2.x), and access
the HTML resource there. Having a local server for Web development
is a Good Thing anyway.

BTW, something is wrong with your mailbox:

| 220www.ts1000.usESMTP Sendmail 8.10.2/8.10.2; Sat, 15 Sep 2007 13:44:36
| -0400
| [...]
| 553 5.3.0 <b...@ts1000.us>... No such user here

HTH

PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f806at$ail$1$8300d...@news.demon.co.uk>
Didn't think of that (putting it on a remote server). I can put it on
one of the servers we host on (ours anyways). Thanks

As for the mailbox. I made the mistake of using that address when I
signed up in google groups. After a year of 200+ spams a day I killed
the address. Don't tell google ok? ;)

Bill H

Sep 15 '07 #3
Bill H wrote:
On Sep 15, 2:00 pm, Thomas 'PointedEars' Lahn <PointedE...@web.de>
wrote:
>Bill H wrote:
>>I know you can use JavaScript to set the size of a window that you
open, but I would like to be able to set the size of the browser to a
specific size. My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.
Any thoughts on how this can be done?
a) Upload the HTML file to a remote Web server, and access it there.
[...]

Didn't think of that (putting it on a remote server). I can put it on
one of the servers we host on (ours anyways). Thanks
You're welcome. But please trim your quotes, as recommended e.g. by the FAQ.
As for the mailbox. I made the mistake of using that address when I
signed up in google groups. After a year of 200+ spams a day I killed
the address.
http://www.interhack.net/pubs/munging-harmful/
Don't tell google ok? ;)
No promises.
PointedEars
--
Prototype.js was written by people who don't know javascript for people
who don't know javascript. People who don't know javascript are not
the best source of advice on designing systems that use javascript.
-- Richard Cornford, cljs, <f8*******************@news.demon.co.uk>
Sep 15 '07 #4
Bill H <bi**@ts1000.us skrev :
>My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.
Change it in your Internet Settings =Avanced.

I don't know, what it is called in an English version, I think
something like »Allow active content ...«.
--
Kerim
Sep 15 '07 #5
In comp.lang.javascript message <11**********************@n39g2000hsh.go
oglegroups.com>, Sat, 15 Sep 2007 10:33:48, Bill H <bi**@ts1000.us>
posted:
>When I do website design I have my screen (on a PC) set for 1600 x
1200 or greater resolution so that I can have as many windows open as
I need and not have to flip between them. The issue I have is the the
IE7 window is never a consistant size because I resize it as I am
using it.

I would like to be able to open up a blank IE 7 window and have it set
to a specific size each time so that I can see the pages I am working
on in the same window size others use.

I know you can use JavaScript to set the size of a window that you
open, but I would like to be able to set the size of the browser to a
specific size. My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.

Any thoughts on how this can be done?
I have a local Home Page which I use as a "favourites"; being a Page, I
can use it in several browsers, format it, trivially copy it to another
machine, etc.

It has
<BODY onLoad="/* window.resizeTo(640, window.screen.height*0.85) */">
in which the comment marks are recent (there's now a Button at the top
to do the resize, as OnLoad is a bit too automatic for something I now
often use). It also has quasi-links to set other favoured sizes.

In IE6 and IE7, from any other ordinary page, I can just do Home
(Button) Back to get to standard size, without prompts. I don't recall
doing anything to the IE setup to make this possible.

FireFox would not resize OnLoad, but does by button; Opera does not.
I've not needed to investigate the matter further.
Button :
<div style="text-align:center;"><input type=button value=ReSize
onClick="window.resizeTo(640, window.screen.height*0.85)"></div>

Links :
<p style="text-align:center;">
<a href="javascript:resizeTo(640,480)">640&times;480</a|
<a href="javascript:resizeTo(800,600)">800&times;600</a|
<a href="javascript:resizeTo(1024,768)">1024&times;76 8</a|
<a href="javascript:resizeTo(1280,1024)">1280&times;1 024</a></p>

--
(c) John Stockton, Surrey, UK. ?@merlyn.demon.co.uk Turnpike v6.05 IE 6
news:comp.lang.javascript FAQ <URL:http://www.jibbering.com/faq/index.html>.
<URL:http://www.merlyn.demon.co.uk/js-index.htmjscr maths, dates, sources.
<URL:http://www.merlyn.demon.co.uk/TP/BP/Delphi/jscr/&c, FAQ items, links.
Sep 15 '07 #6

"Bill H" <bi**@ts1000.uswrote in message
news:11**********************@n39g2000hsh.googlegr oups.com...
When I do website design I have my screen (on a PC) set for 1600 x
1200 or greater resolution so that I can have as many windows open as
I need and not have to flip between them. The issue I have is the the
IE7 window is never a consistant size because I resize it as I am
using it.

I would like to be able to open up a blank IE 7 window and have it set
to a specific size each time so that I can see the pages I am working
on in the same window size others use.

I know you can use JavaScript to set the size of a window that you
open, but I would like to be able to set the size of the browser to a
specific size. My thought was to create a blank page on my desktop
that contained Javascript to size the window when I open it, but since
IE7 doesn't like running any local Javascript without prompting you to
do it I am not sure how I could do this.

Any thoughts on how this can be done?

Bill H
Google "bookmarklet"
Sep 17 '07 #7
Thomas 'PointedEars' Lahn said the following on 9/15/2007 2:27 PM:
Bill H wrote:
<snip>
>As for the mailbox. I made the mistake of using that address when I
signed up in google groups. After a year of 200+ spams a day I killed
the address.

http://www.interhack.net/pubs/munging-harmful/
Pure unadulterated garbage.

--
Randy
Chance Favors The Prepared Mind
comp.lang.javascript FAQ - http://jibbering.com/faq/index.html
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/
Sep 23 '07 #8

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

Similar topics

2
by: Put 030516 in email subj to get thru | last post by:
I've always been bothered about having to statically declare the size of a Java applet window (container?) in the calling HTML. I've always wanted the moral equivalent of width=50% statement (of...
2
by: Randell D. | last post by:
HELP! Its taken me ages - I'm a newbie and I've compiled bits of code that I've read in this newsgroup over time to create one of my most intricate functions to date... Basically, the script...
53
by: Cardman | last post by:
Greetings, I am trying to solve a problem that has been inflicting my self created Order Forms for a long time, where the problem is that as I cannot reproduce this error myself, then it is...
12
by: Mal Ice | last post by:
I am creating an initial index.htm page on which I show some disclaimers and introduction information. In the head section I have Javascript which determines the screen resolution of the client....
13
by: Stumped and Confused | last post by:
Hello, I really, really, need some help here - I've spent hours trying to find a solution. In a nutshell, I'm trying to have a user input a value in form's textfield. The value should then be...
14
by: Karin Jensen | last post by:
Hi - I am trying to use Javascript to put material inside a table (i.e. alongside the previous material) if the user's screensize is big enough and outide the table (beneath table) if it isn't. ...
3
by: vanisathish | last post by:
Hi I am running a client side javascript timer to periodically refresh the contents of some tables in the HTML page. The table values are dynmically binded from XML DOM object using the <XML tag...
3
by: anthonybrough | last post by:
I have an asp page that has a form to collect user data in a form. when the user clicks submit the input is validated. If any fields are not acceptable the user clicks on a button to go back to...
2
by: shivendravikramsingh | last post by:
hi friends, i m using a ajax function for retrieving some values from a database table,and display the values in required field,my prob is that the ajax function i m using is working f9 once,but if...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
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,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.