moveTo and resize on firefox

F

franz

hallo everyone,
i have a popup window 500x400px centered in the middle of the screen
and inside it there's a mini-photogallery.
what i want is to click on a thumbnail and open in the same window a page
that is fullscreen big and move to co-ordinates (0,0)
I've written some code to do that:

<script language="JavaScript">
<!--
function resize_()
{
window.resizeTo(screen.width,screen.height)
moveTo(0,0)
}
-->
</script>
</head>
<body onload="javascript:resize_();">

but what i get from this is:
with IE: the windows moves to (0,0) and becomes bigger but not fullscreen
with FIREFOX: the window doesn't move and doesn't resize
Is there anyone who let me understand what's wrong with the code above?
Thanks a lot
 
M

Martin Honnen

franz wrote:

function resize_()
{
window.resizeTo(screen.width,screen.height)
moveTo(0,0)
}
<body onload="javascript:resize_();">

but what i get from this is:
with FIREFOX: the window doesn't move and doesn't resize

Firefox can be configured to allow or disallow script to do certain
things so that Firefox is then configured to disallow script to move or
resilze the window.
 
D

David Dorward

franz said:
i have a popup window 500x400px centered in the middle of the screen
and inside it there's a mini-photogallery.
what i want is to click on a thumbnail and open in the same window a page
that is fullscreen big and move to co-ordinates (0,0)

Using your code: http://dorward.me.uk/tmp/fullscreen.jpeg

The user visits your website with a window that is the right size for their
desktop. Adapt your website to fit their window, don't try to adapt their
system to suit your website - such efforts are doomed to failure.
 
F

franz

The user visits your website with a window that is the right size for
their
desktop. Adapt your website to fit their window, don't try to adapt their
system to suit your website - such efforts are doomed to failure.

thanks for the capture.
I really didn't mean to adapt the user system to my website.
What I'd like is that my page adapts itself to the desktop of the user.
It seems that this cannot be done with my simple code.
Maybe you can suggest me some code more pro to do what i mean.
Reguarding to Martin, i've browsed sites showing self-resizeable windows on
firefox. So it sounds strange to me that moveTo and resize work only if
firefox
is locally well setted.
 
M

Martin Honnen

franz wrote:

Reguarding to Martin, i've browsed sites showing self-resizeable windows on
firefox. So it sounds strange to me that moveTo and resize work only if
firefox
is locally well setted.

Check your Firefox settings, it has settings to allow or disallow
scripts to move or resize windows. You will find that under
Tools->Options->Web Features->JavaScript->Advanced->Allow scripts to
move or resize windows

If the settings to allow scripts is on then you will have to post a URL
where the problem occurs or at least tell us whether your script console
shows any errors.
 
L

Lee

franz said:
What I'd like is that my page adapts itself to the desktop of the user.

That's not what you're asking for. You're asking to be able to resize
the browser window. The browser window is not your page.

I paid for a large monitor so that I can have a browser window, a text
editor, and two or more other windows open and useful at the same time.
You have no right to expand one of those windows to take up my entire
screen. If I see something on your site that I'd like to expand to
fill my window, I've quite capable of enlarging it.
 
F

franz

Lee said:
I paid for a large monitor so that I can have a browser window, a text
editor, and two or more other windows open and useful at the same time.
You have no right to expand one of those windows to take up my entire
screen. If I see something on your site that I'd like to expand to
fill my window, I've quite capable of enlarging it.

i respect your point of view.
I'm not talking about rights or stuff like this...i'm talking about the
chance
to do what i asked for.
I'm asking why not with firefox. I'm not saying:"Ehi, guys, my website MUST
be
fullscreen"
I was wondering why firefox doesn't read moveTo func.
That's all.
What's more the photographer i'm making the site for, is asking this feature
and as you probably know, he doesn't want any other solution.
What I had before was simply another popup window opening fullscreen and
this worked well with all browsers.
The photographer doesn't want anymore another window opening but he prefers
the same window that resize itself.
By the way, Lee, thanks for your explanation
 
G

Gérard Talbot

franz a écrit :
i respect your point of view.
I'm not talking about rights or stuff like this...i'm talking about the
chance
to do what i asked for.
I'm asking why not with firefox. I'm not saying:"Ehi, guys, my website MUST
be
fullscreen"
I was wondering why firefox doesn't read moveTo func.
That's all.

Most browser manufacturers now give full absolute veto power to users
regarding capability of scripts to move, to resize, to fullscreen, to
disable right-click, etc... of browser windows.
What's more the photographer i'm making the site for, is asking this feature
and as you probably know, he doesn't want any other solution.

The solution to such question, to such web page issue is already
entirely and absolutely in the hands of the users of modern browsers.
The content developer does not have any rights and any power over the
browser window of the users. Simple as that.
What I had before was simply another popup window opening fullscreen and
this worked well with all browsers.

That can not be true.

http://developer-test.mozilla.org/en/docs/window.open#Note_on_fullscreen

{
In MSIE 6 for XP SP2:

* "window.open() with fullscreen=yes will now result in a maximized
window, not a kiosk mode window."

* "The definition of the fullscreen=yes specification is changed to
mean 'show the window as maximized,' which will keep the title bar,
address bar, and status bar visible."
}

and you can expect MSIE 7 to reduce the powers of scripters and content
developers over the (browser windows of) users.

NS 7.x, Mozilla 1.x and Firefox 1.x do not support fullscreen as a
windowFeature of the open() method.
The photographer doesn't want anymore another window opening but he prefers
the same window that resize itself.

As already mentioned, the setting, positioning, size, features of a
browser window should rest entirely within the power and preferences of
the users, only with the users.

Gérard
 
F

franz

Gérard Talbot said:
What I had before was simply another popup window opening fullscreen and
this worked well with all browsers.

That can not be true.

http://developer-test.mozilla.org/en/docs/window.open#Note_on_fullscreen


Thanks for the link.
Sorry, I've been a little superficial: kiosk mode wasn't what i got.
I had only a window full screen with status bar and title bar visible.
Btw I suppose I have to change solution.
Maybe I will keep my previous "full desktop size" window and operate
within, without pretending to resize or move it.
Thanks again to everyone for the explanations.
 
F

franz

ok, sorry for boring again:
http://www.mydigitaldiscount.com/s.nl/sc.1/.f

click on the top right, on the seal Hacker Safe.
You'll get a window that moves and resize, vene in IE and Firefox.
That's what I want, or better what the photographer want.
Reading the code it doesn't seem so different from mine. I'll try to
obtain the same result.
 
T

The Magpie

franz said:
[snip]
i have a popup window 500x400px centered in the middle of the screen
and inside it there's a mini-photogallery.
what i want is to click on a thumbnail and open in the same window a page
that is fullscreen big and move to co-ordinates (0,0)
[snip]
In Firefox the user can do exactly as I have done. I forbid Javascript
or anything else from changing the size of moving the location of the
browser window. I already have them exactly as large and exactly located
where I want them.

Instead, pop up your window and use the same button, but have it pop up
a new window as big as you want it and where you want it and to remove
the first popup. It will look much the same but under the hood is quite
different.
 
D

David Dorward

franz said:
click on the top right, on the seal Hacker Safe.
You'll get a window that moves and resize, vene in IE and Firefox.

Nope, I get a new tab (Argh, why are then inflicting new tabs on me[1]?)
which doesn't change size at all.

[1] They are trying to inflict a new window on me - which is even worse.
 
L

Lee

franz said:
ok, sorry for boring again:
http://www.mydigitaldiscount.com/s.nl/sc.1/.f

click on the top right, on the seal Hacker Safe.
You'll get a window that moves and resize, vene in IE and Firefox.

Not the way I have Firefox configured. As it happens, at the moment
I allow it to open new windows, but not to resize them.

If what your client wants is a bad idea, it's your responsibility
to try to talk him out of it. Barring that, explain that since
lots of people consider it to be very rude to try to resize their
windows, it won't work for them.
 
T

Thomas 'PointedEars' Lahn

Gérard Talbot said:
NS 7.x, Mozilla 1.x and Firefox 1.x do not support fullscreen
as a windowFeature of the open() method.

That is not entirely true. Previous versions of Netscape 7.x,
Mozilla 1.x and Firefox 1.x did support the `fullscreen' feature.


PointedEars
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,020
Latest member
GenesisGai

Latest Threads

Top