473,385 Members | 1,942 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,385 software developers and data experts.

moveTo and resize on firefox

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

--
franz
Jul 23 '05 #1
14 31876


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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #2
franz wrote:
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.
--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #3
"David Dorward" <do*****@yahoo.com> ha scritto
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)
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.

---
franz
Jul 23 '05 #4


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.

--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #5
franz wrote:
The user visits your website with a window that is the right size for
their desktop. Adapt your website to fit their window
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.


http://www.allmyfaqs.com/faq.pl?AnySizeDesign

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #6
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.

Jul 23 '05 #7
"Lee" <RE**************@cox.net> ha scritto
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

--
franz
Jul 23 '05 #8
franz a écrit :
"Lee" <RE**************@cox.net> ha scritto

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.


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..._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
--
remove blah to email me
Jul 23 '05 #9

"Gérard Talbot" <ne***********@gtalbot.org> ha scritto
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..._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.

--
franz
Jul 23 '05 #10
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.

--
franz
Jul 23 '05 #11
franz wrote:
[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.
Jul 23 '05 #12
franz wrote:
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.

--
David Dorward <http://blog.dorward.me.uk/> <http://dorward.me.uk/>
Home is where the ~/.bashrc is
Jul 23 '05 #13
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.

Jul 23 '05 #14
Gérard Talbot wrote:
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
--
Alcohol and Math don't mix. So please don't drink and derive!
Jul 23 '05 #15

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

Similar topics

14
by: Nigel Mercier ® | last post by:
I'm just starting to learn JavaScript, so far I like it! I want to add some JS to my Ebay listings, to manually open a pop-up window. It works OK, but the JS gets rejected by Ebay. If I can't...
10
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...
6
by: David Hayes | last post by:
juglesh <juglesh@nospamRadioKDUG.com> wrote in "Re: how to maximize the browser window that fits the monitor size?" (Saturday, January 01, 2005 3:12 AM): > > >I want to maximize the browser...
3
by: Dave Hammond | last post by:
Hi All, This one is a bit bizarre. My understanding of "Access is denied" with respect to window.moveTo is that it results from a request which would move a portion of the window off screen. ...
3
by: anonieko | last post by:
You can try this code: > > > > > <!--- filename: mypage.html ----> <html> ....blah blah blah <script language=JavaScript src=/Javascript/center.js></script>
23
by: Markus | last post by:
Hi, i have this problem: Sometimes, i can't reproduce, if i click on an small image on the website, the popup _AND_ an other Tab in firefox open. Here are the linkcode: <div...
6
by: hannibal | last post by:
Hi, i need to refresh page cathcing "onResize" event. I wrote this code: <body onResize="javascript:winodw.location.reload(true); return true;"> On I.E. it works, but it doesn't work on...
4
by: Terren | last post by:
I have a popup window that is used to display text from a database. Some times it can be a few words, sometimes it can be a hundred words. What I would like to do is resize the popup window to...
3
by: niconedz | last post by:
Hi The following code works fine in IE but not Firefox. It's a little script that zooms an image and resizes the window to fit. Can anybody tell me what's wrong? Thanks Nico == btw.....
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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.