By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,492 Members | 1,242 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,492 IT Pros & Developers. It's quick & easy.

Using JavaScript to set the browser size

P: n/a
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
Share this Question
Share on Google+
7 Replies


P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.