Where did you install Firefox from? Help Mozilla uncover 3rd party websites that offer problematic Firefox installation by taking part in our campaign. There will be swag, and you'll be featured in our blog if you manage to report at least 10 valid reports!

搜索 | 用户支持

防范以用户支持为名的诈骗。我们绝对不会要求您拨打电话或发送短信,及提供任何个人信息。请使用“举报滥用”选项报告涉及违规的行为。

Learn More

can't execute javascript from URL window in Firefox 6.0.2

  • 4 个回答
  • 31 人有此问题
  • 1 次查看
  • 最后回复者为 tamassch

more options

I used to be able to execute this simple line of java code from the URL window inside google maps to get the lat / long of a point.

javascript:alert(window.gApplication.getMap().getCenter());

however since I upgraded firefox recently, I get no result typing this into the URL window, not even an error message. I've checked all the javascript settings under tools, options, they're all enabled.

why does this no longer generate an alert window with the lat/long coordinates like it used to? What setting do I need to change to restore this functionality?

I used to be able to execute this simple line of java code from the URL window inside google maps to get the lat / long of a point. javascript:alert(window.gApplication.getMap().getCenter()); however since I upgraded firefox recently, I get no result typing this into the URL window, not even an error message. I've checked all the javascript settings under tools, options, they're all enabled. why does this no longer generate an alert window with the lat/long coordinates like it used to? What setting do I need to change to restore this functionality?

被采纳的解决方案

On my version, I found under tools, Web Developer > Scratchpad - this popped open a window with instructions in there on how to run scripts.

(You can also try shift + F4 to open Scratchpad)

定位到答案原位置 👍 2

所有回复 (4)

more options

In firefox 6 javascript in the urlbar runs with a null security principal for security reasons. So it's mostly disabled. Users were installing malware. You can use the new scratchpad feature or you need a workaround. See cor-el in question 871828 for details.

more options

选择的解决方案

On my version, I found under tools, Web Developer > Scratchpad - this popped open a window with instructions in there on how to run scripts.

(You can also try shift + F4 to open Scratchpad)

more options

Thanks guys for responding, I appreciate the replies. I was not aware this functionality had been removed in version 6. In any case, the scratch pad seems like a cool workaround

more options