Windows 10 reached EOS (end of support) on October 14, 2025. If you are on Windows 10, see this article.

Search Support

Avoid support scams. We will never ask you to call or text a phone number or share personal information. Please report suspicious activity using the “Report Abuse” option.

Learn More
Archived

Bookmarklets not working

Matt Brubeck replied
insomniax88

So im trying to do javascript:alert("hello"); in the URL window and its not coming up with anything. This works in IE and in Chrome. I'm wondering if there is an add on or something that i need to get, I'd rather not convert to Chrome for this issue alone but i do need bookmarklets to be working properly.

So im trying to do javascript:alert("hello"); in the URL window and its not coming up with anything. This works in IE and in Chrome. I'm wondering if there is an add on or something that i need to get, I'd rather not convert to Chrome for this issue alone but i do need bookmarklets to be working properly.

All Replies (4)

See the Tools > Error Console and you will see an error.

Error: uncaught exception: ReferenceError: alert is not defined

You can no longer run JavaScript code like that via the location bar in Firefox 6+ (Bug 656433).
You need to create a bookmark and run the code by invoking that bookmark.
I've seen a post that NoScript is able to restore that feature. .....

  • Bug 656433 - Disallow javascript: URLs to be run from the URL bar

So does that mean there is no work around? I'd like to be able to do this with the location bar.

I'm not having any luck creating Javascript bookmarklets in Bookmarks and running them, either. For instance, this one:

javascript:moveTo(screen.availWidth-1080,6);resizeTo(1073,screen.availHeight-14)

... used to work great for me right through Firefox 6.0.2 (and works great for me once again, now that I've downgraded), but doesn't work in Firefox 7.

Modified by mgrad92

To run JavaScript snippets in newer versions of Firefox, try the Web Console or Scratchpad features in the Web Developer menu. (You don't need to type "javascript:" at the start of your code when you use these features.)

The "moveTo" bookmarklet is probably broken because of this change: Bug 565541 - Web sites shouldn't be allowed to resize main window