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

force maximised window?

P: n/a
Hello,

Can I use JavaScript to force a maximised window ?
Thanks
Nov 2 '05 #1
Share this Question
Share on Google+
17 Replies


P: n/a
i haven't tried this, but maybe:

window.resizeTo(window.screen.availWidth, window.screen.availHeight);

or possibly

window.resizeTo(window.screen.width, window.screen.height);

If anything, check out the window and screen objects

Nov 2 '05 #2

P: n/a
Geoff Cox wrote:
Hello,

Can I use JavaScript to force a maximised window ?


No.

http://webtips.dan.info/force.html

Stewart.

--
-----BEGIN GEEK CODE BLOCK-----
Version: 3.1
GCS/M d- s:- C++@ a->--- UB@ P+ L E@ W++@ N+++ o K-@ w++@ O? M V? PS-
PE- Y? PGP- t- 5? X? R b DI? D G e++>++++ h-- r-- !y
------END GEEK CODE BLOCK------

My e-mail is valid but not my primary mailbox. Please keep replies on
the 'group where everyone may benefit.
Nov 2 '05 #3

P: n/a
On Wed, 02 Nov 2005 19:08:57 +0000, Stewart Gordon
<sm*******@yahoo.com> wrote:
Geoff Cox wrote:
Hello,

Can I use JavaScript to force a maximised window ?


No.

http://webtips.dan.info/force.html


Stewart,

I accept that this would not normally be a good idea but I would be
using it for a small number of people for whom it might improve the
situation.

The reason for perhaps using it is that I have a slider with a
pointer. If the user starts with a minimised window and then maximises
it, the pointer image stays where it is and is thus in the wrong
position for the maximised window...

Cheers

Geoff

Nov 2 '05 #4

P: n/a
On 2 Nov 2005 11:04:07 -0800, "bobzimuta" <ej******@gmail.com> wrote:
i haven't tried this, but maybe:

window.resizeTo(window.screen.availWidth, window.screen.availHeight);
this does the trick - thanks,

Geoff
or possibly

window.resizeTo(window.screen.width, window.screen.height);

If anything, check out the window and screen objects


Nov 2 '05 #5

P: n/a

"Geoff Cox" <ge*******@notquitecorrectfreeuk.com> wrote in message
news:54********************************@4ax.com...
On Wed, 02 Nov 2005 19:08:57 +0000, Stewart Gordon
<sm*******@yahoo.com> wrote:
Geoff Cox wrote:
Hello,

Can I use JavaScript to force a maximised window ?


No.

http://webtips.dan.info/force.html


Stewart,

I accept that this would not normally be a good idea but I would be
using it for a small number of people for whom it might improve the
situation.

The reason for perhaps using it is that I have a slider with a
pointer. If the user starts with a minimised window and then maximises
it, the pointer image stays where it is and is thus in the wrong
position for the maximised window...


move the image when the window is resized.
Nov 2 '05 #6

P: n/a

Can I use JavaScript to force a maximised window ?


No.

http://webtips.dan.info/force.html


Those *tips* are very small minded. What if the web designer has absolute
control over the users browsing environment ? Perhaps the *site* is an
intranet and all desktops have the same settings. I think the whole article
is a little out of date !!
Nov 2 '05 #7

P: n/a
On Wed, 02 Nov 2005 22:11:44 GMT, "Zoe Brown"
<zo***********@N-O-S-P-A-A-Mtesco.net> wrote:
The reason for perhaps using it is that I have a slider with a
pointer. If the user starts with a minimised window and then maximises
it, the pointer image stays where it is and is thus in the wrong
position for the maximised window...


move the image when the window is resized.


Zoe,

Not sure what you mean re "move the image" ?

I had thought that perhaps I need to "refresh" the page if the user
resizes the window as that does put the pointer image back in the
right place.

How do I detect a change in size and then force a refresh?

Cheers

Geoff

Nov 2 '05 #8

P: n/a
bobzimuta wrote:
window.resizeTo(window.screen.availWidth, window.screen.availHeight);


Argh! http://dorward.me.uk/tmp/fullscreen.jpeg


--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Nov 2 '05 #9

P: n/a
Lee
Zoe Brown said:


Can I use JavaScript to force a maximised window ?


No.

http://webtips.dan.info/force.html


Those *tips* are very small minded. What if the web designer has absolute
control over the users browsing environment ?Perhaps the *site* is an
intranet and all desktops have the same settings. I think the whole article
is a little out of date !!


I really hate it when a web developer thinks that just because we're
on the same intranet, that I must have the same size monitor and the
same browser settings. Some of us have larger monitors than the web
developers, because it's required for our jobs. Some have large fonts
because they don't see well.

Nobody should ever assume that they have absolute control over the
users browsing environment.

Nov 2 '05 #10

P: n/a
Geoff Cox wrote:
On Wed, 02 Nov 2005 22:11:44 GMT, "Zoe Brown"
<zo***********@N-O-S-P-A-A-Mtesco.net> wrote:
The reason for perhaps using it is that I have a slider with a
pointer. If the user starts with a minimised window and then maximises
it, the pointer image stays where it is and is thus in the wrong
position for the maximised window...

move the image when the window is resized.


Zoe,

Not sure what you mean re "move the image" ?

I had thought that perhaps I need to "refresh" the page if the user
resizes the window as that does put the pointer image back in the
right place.

How do I detect a change in size and then force a refresh?


You don't need to 'force a refresh', just update the location of the
slider(s):

<URL:http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/handlers.html#1121061>


--
Rob
Nov 3 '05 #11

P: n/a
Zoe Brown wrote:
Can I use JavaScript to force a maximised window ?
No.

http://webtips.dan.info/force.html

Those *tips* are very small minded. What if the web designer has absolute
control over the users browsing environment ? Perhaps the *site* is an
intranet and all desktops have the same settings.


If you have such control over the user then why even bother with
designing a GUI in a web environment? Just start a normal windows
application.
I think the whole article
is a little out of date !!


Actually those articles are too late and should have been written from
day one.
Nov 3 '05 #12

P: n/a
On Thu, 03 Nov 2005 03:55:57 GMT, RobG <rg***@iinet.net.au> wrote:

How do I detect a change in size and then force a refresh?


You don't need to 'force a refresh', just update the location of the
slider(s):

<URL:http://devedge-temp.mozilla.org/library/manuals/2000/javascript/1.3/reference/handlers.html#1121061>


Thanks a lot Rob - the onResize() and re-setting the slider solved the
problem !

Cheers

Geoff

Nov 3 '05 #13

P: n/a

"Robert" <ro****@noreply.x> wrote in message
news:43***********************@news.xs4all.nl...
Zoe Brown wrote:
Can I use JavaScript to force a maximised window ?

No.

http://webtips.dan.info/force.html

Those *tips* are very small minded. What if the web designer has
absolute control over the users browsing environment ? Perhaps the *site*
is an intranet and all desktops have the same settings.


If you have such control over the user then why even bother with designing
a GUI in a web environment? Just start a normal windows application.


that is a good point, but the answer is why not. Plenty of companies use
web technology simple cos they have them available and they are cheap.

Nov 4 '05 #14

P: n/a

"Lee" <RE**************@cox.net> wrote in message
news:dk********@drn.newsguy.com...
Zoe Brown said:


Can I use JavaScript to force a maximised window ?

No.

http://webtips.dan.info/force.html
Those *tips* are very small minded. What if the web designer has absolute
control over the users browsing environment ?Perhaps the *site* is an
intranet and all desktops have the same settings. I think the whole
article
is a little out of date !!


I really hate it when a web developer thinks that just because we're
on the same intranet, that I must have the same size monitor and the
same browser settings. Some of us have larger monitors than the web
developers, because it's required for our jobs. Some have large fonts
because they don't see well.

Nobody should ever assume that they have absolute control over the
users browsing environment.


except of course when they actually do. Consider a subscription only site
where the subscribers pay for a particular experience and in return the
developers request they have certain settings on the desktop

Nov 4 '05 #15

P: n/a
Lee
Zoe Brown said:
Nobody should ever assume that they have absolute control over the
users browsing environment.


except of course when they actually do. Consider a subscription only site
where the subscribers pay for a particular experience and in return the
developers request they have certain settings on the desktop


That's not having control over the environment.
That's simply saying that if you don't using the settings that
I want you to use, you're not allowed to pay me any money.
Pretty stupid business model.

Nov 4 '05 #16

P: n/a

"Lee" <RE**************@cox.net> wrote in message
news:dk********@drn.newsguy.com...
Zoe Brown said:
Nobody should ever assume that they have absolute control over the
users browsing environment.


except of course when they actually do. Consider a subscription only site
where the subscribers pay for a particular experience and in return the
developers request they have certain settings on the desktop


That's not having control over the environment.
That's simply saying that if you don't using the settings that
I want you to use, you're not allowed to pay me any money.
Pretty stupid business model.


Not if it is at the customers request. Customers request a product to be
delivered over the interenet that does ABC and in return they will pay and
ensure that XYZ is correct on their desktop.
Nov 4 '05 #17

P: n/a
Lee
Zoe Brown said:


"Lee" <RE**************@cox.net> wrote in message
news:dk********@drn.newsguy.com...
Zoe Brown said:
Nobody should ever assume that they have absolute control over the
users browsing environment.

except of course when they actually do. Consider a subscription only site
where the subscribers pay for a particular experience and in return the
developers request they have certain settings on the desktop


That's not having control over the environment.
That's simply saying that if you don't using the settings that
I want you to use, you're not allowed to pay me any money.
Pretty stupid business model.


Not if it is at the customers request. Customers request a product to be
delivered over the interenet that does ABC and in return they will pay and
ensure that XYZ is correct on their desktop.


Nov 7 '05 #18

This discussion thread is closed

Replies have been disabled for this discussion.