X
Nhấn vào đây để đến phiên bản di động của trang web.

Diễn đàn trợ giúp

window.resize javascript function does not work in v7 even though option enabled

Được đăng

Build identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

[script type="text/javascript"] [!-- window.resizeTo(740, 735); //--] /script

This function no longer resizes popped-out windows even though Options -> Content -> JavaScript Advanced -> Move or resize existing windows is enabled.

Build identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1 [script type="text/javascript"] [!-- window.resizeTo(740, 735); //--] [/script] This function no longer resizes popped-out windows even though Options -> Content -> JavaScript Advanced -> Move or resize existing windows is enabled.

Được chỉnh sửa bởi p-p-k-b vào

Giải pháp được chọn

The solution is kind of cryptic, please show the entire new script. I don't know anything about javascript. Thanks.

Đọc câu trả lời này trong ngữ cảnh 0

Chi tiết hệ thống bổ sung

Điều này đã xảy ra

Bất cứ khi nào Firefox được mở lên

Điều này bắt đầu khi...

Upgraded from 6.x to 7

Phần bổ trợ đã cài đặt

  • Next Generation Java Plug-in 10.0.0 for Mozilla browsers
  • NPRuntime Script Plug-in Library for Java(TM) Deploy
  • Shockwave Flash 11.0 r1
  • Google Update
  • The QuickTime Plugin allows you to view a wide variety of multimedia content in Web pages. For more information, visit the QuickTime Web site.
  • iTunes Detector Plug-in
  • Version 1.1.11, copyright 1996-2011 The VideoLAN Teamhttp://www.videolan.org/
  • 4.0.60531.0
  • DivX Web Player version 2.1.2.265
  • DivX VOD Helper Plug-in
  • Adobe Shockwave for Director Netscape plug-in, version 11.5.9.620
  • Adobe PDF Plug-In For Firefox and Netscape

Ứng dụng

  • Chuỗi đại diện người dùng: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1

Thông tin chi tiết

cor-el
  • Top 10 Contributor
  • Moderator
17576 giải pháp 158993 câu trả lời
Được đăng

The Advanced JavaScript setting to move and resize now only applies to pop-up windows and not to the main window.

  • Tools > Options > Content : JavaScript > Advanced > Allow Scripts to: [] "Move or resize existing windows"

See https://developer.mozilla.org/en/Firefox_7_for_developers#DOM

  • 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)

The Advanced JavaScript setting to move and resize now only applies to pop-up windows and not to the main window. *Tools > Options > Content : JavaScript > Advanced > Allow Scripts to: [] "Move or resize existing windows" See https://developer.mozilla.org/en/Firefox_7_for_developers#DOM *window.resizeTo and window.resizeBy no longer apply to the main window. ---- *[https://bugzilla.mozilla.org/show_bug.cgi?id=565541 Bug 565541] – Web sites shouldn't be allowed to resize main window *[https://bugzilla.mozilla.org/show_bug.cgi?id=690648 Bug 690648] – Clarify popup-only move/resize window preference label ''(please do not comment in bug reports)''

Người tạo câu hỏi

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);

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);

Được chỉnh sửa bởi p-p-k-b vào

mdbollman 0 giải pháp 1 câu trả lời
Được đăng

Anyone? what denotes a window as not being the "Main Window"?

Anyone? what denotes a window as not being the "Main Window"?
dfarrow 0 giải pháp 1 câu trả lời
Được đăng

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'".

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'".
griswolf 0 giải pháp 6 câu trả lời
Được đăng

So, if javascript won't work anymore to let me resize my window, how can I get similar functionality: I really like having a resizer in the upper left bookmark so when the window slides off the screen, I can easily get it back; and can put the desktop in a "normal" format. This seems like a regression to me. Work arounds please? (Yes, I know I can fiddle with the edges by mouse, but I don't like trying to catch the edge with the cursor: my hands don't move smoothly any more)

So, if javascript won't work anymore to let me resize my window, how can I get similar functionality: I really like having a resizer in the upper left bookmark so when the window slides off the screen, I can easily get it back; and can put the desktop in a "normal" format. This seems like a regression to me. Work arounds please? (Yes, I know I can fiddle with the edges by mouse, but I don't like trying to catch the edge with the cursor: my hands don't move smoothly any more)
cor-el
  • Top 10 Contributor
  • Moderator
17576 giải pháp 158993 câu trả lời
Được đăng

You can do that with code in the Firefox > Web Developer > Error Console or with an extension like ResizeIT


You can do that with code in the Firefox > Web Developer > Error Console or with an extension like [https://addons.mozilla.org/firefox/addon/resizeit/ ResizeIT] ---- *[[/questions/880032]]
rjohnson19 39 giải pháp 240 câu trả lời
Được đăng

Câu trả lời hữu ích

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.

See https://bugzilla.mozilla.org/show_bug.cgi?id=691693

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. See https://bugzilla.mozilla.org/show_bug.cgi?id=691693
griswolf 0 giải pháp 6 câu trả lời
Được đăng

Câu trả lời hữu ích

My issue is that being unable to programmatically resize/reposition the main window is a regression from functionality that I find to be very valuable. If javascript cannot be used to resize the main window how *can* I do what I used to do with a javascriptlet bookmark? I have motor-control issues that make it much easier to use a bookmark than to grab the edge of the window with the mouse.

My issue is that being unable to programmatically resize/reposition the main window is a regression from functionality that I find to be very valuable. If javascript cannot be used to resize the main window how *can* I do what I used to do with a javascriptlet bookmark? I have motor-control issues that make it much easier to use a bookmark than to grab the edge of the window with the mouse.
jdvb 0 giải pháp 2 câu trả lời
Được đăng

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(....)

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(....)

Người tạo câu hỏi

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.

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.
blel 1 giải pháp 3 câu trả lời
Được đăng

Giải pháp được chọn

The solution is kind of cryptic, please show the entire new script. I don't know anything about javascript. Thanks.

The solution is kind of cryptic, please show the entire new script. I don't know anything about javascript. Thanks.
rlindabury 0 giải pháp 2 câu trả lời
Được đăng

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.

There is no reason why we shouldn't be able to use javascript to resize children windows opened with window.open.

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.

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. There is no reason why we shouldn't be able to use javascript to resize children windows opened with window.open. 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.
rlindabury 0 giải pháp 2 câu trả lời
Được đăng

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! :-)

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! :-)
billk156 0 giải pháp 1 câu trả lời
Được đăng

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 ;-)

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 ;-)