Denne tråd blev arkiveret. Stil et nyt spørgsmål, hvis du har brug for hjælp.
Build identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1
Ændret af p-p-k-b den
Alle svar (14)
- window.resizeTo and window.resizeBy no longer apply to the main window.
- Bug 565541 – Web sites shouldn't be allowed to resize main window
- Bug 690648 – Clarify popup-only move/resize window preference label
(please do not comment in bug reports)
So, if the script is in the pop-out window, then this is considered to be the "main window" and the resize should be called from the calling page? Something like:
winname = window_open('url', 'winname', 'vars'); winname.resizeTo(123, 456);
Ændret af p-p-k-b den
Anyone? what denotes a window as not being the "Main Window"?
The meaning of "main window" needs to be clarified. I tried to open a popup window using "window.open" and then tried a "resizeBy()" call on that popup from the parent window, but I got "Error: Permission denied to access property 'resizeTo'".
If you are trying to resize a popup window (opened via window.open()) and not the main window, and it is not working, it could be due to an issue with Firebug.
Disabling Firebug should cause resizing to work again.
Sad to say that even when disabeling firebug my script will no longer resize my image popup window. It does not work on other FF installations that do not have firebug installed either. Niether in safe mode nor in normal mode.
window opened through window.open(....)
You sure you disabled the addon and restarted Firefox completely? I've found that on Windows, the firefox.exe process does not always end properly and sometimes requires an "End Process Tree" from Task Manager.
I also thought, from the bug, this should've been fixed with the 1.8.4 release, but maybe the 8 release of FF stuffed that up.
This js function doesn't work in Firefox v8 either. I'm opening a new window with window.open as follows:
window.open(fullurl, windowName, 'toolbar=no,menubar=no,location=no,scrollbars=no,resizable=yes,width=560,height=230');
However, that is the minimum height of the window. I need to be able to allow my users to view additional details in this "Status" window. I've created a toggle control to show/hide progress details and it works in all browsers EXCEPT Firefox 7/8. C'mon. WTF??
This is NOT the main window. It is a window with no controls other than what are IN the window itself. The users of this application need to be able to easily resize the window with the control.
Yes, they drag the window size to be larger but I'm trying to simplify things for them and create a simple user interface.
Sigh.. There have been browser compatibility issues for us developers for years. You'd think at some point they'd be reduced but they seem to increase!
Very frustrating especially when you're on a deadline.
Ok.. it does work in FF8! The previous poster was correct. FireBug hoses it up. You must completely disable the add-on and restart Firefox. You have to make sure that Firefox has completely closed and then reopen it after disabling FireBug. I had Firebug 1.8.4 running and the window.open window would not resize. With it disabled it works as expected.
Sorry for the rant, I've been coding way to long today! :-)
Worked perfectly - thanks very much. Firebug is quite useful so I don't mind the issue - just did not want all of my customers having the same issue ;-)