Join the AMA (Ask Me Anything) with the Firefox leadership team to celebrate Firefox 20th anniversary and discuss Firefox’s future on Mozilla Connect. Mark your calendar on Thursday, November 14, 18:00 - 20:00 UTC!

This site will have limited functionality while we undergo maintenance to improve your experience. If an article doesn't solve your issue and you want to ask a question, we have our support community waiting to help you at @FirefoxSupport on Twitter and/r/firefox on Reddit.

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

Lolu chungechunge lwabekwa kunqolobane. Uyacelwa ubuze umbuzo omusha uma udinga usizo.

FF 14.0.1: Bookmark with java-script function to build and open URL. Works unless clicked when already in a new blank tab, then does nothing. Why?

more options

On 14.0.1 I have a bookmark which calls a java script function to prompt for input, build and call a dynamic URL. This has worked fine until last update of FF. It works fine if I right click and select Open in a New Tab, or new window. It works fine if I am in any other website and click it. It only does not work, if I open a new blank tab or window, and then click it from inside that new tab. Then it does nothing. Same happens whether the "New tab Page" is displayed or not. Same happens in safe mode.

Bookmark properties:

javascript:void(str=prompt(%22Document%20Number:%22,%22%22));if(str){location.href=%22https://somecompany.com/oip/faces/secure/km/DocumentDisplay.jspx?id=%22+escape(str).split(%22%20%22).join(%22+%22);}

On 14.0.1 I have a bookmark which calls a java script function to prompt for input, build and call a dynamic URL. This has worked fine until last update of FF. It works fine if I right click and select Open in a New Tab, or new window. It works fine if I am in any other website and click it. It only does not work, if I open a new blank tab or window, and then click it from inside that new tab. Then it does nothing. Same happens whether the "New tab Page" is displayed or not. Same happens in safe mode. Bookmark properties: javascript:void(str=prompt(%22Document%20Number:%22,%22%22));if(str){location.href=%22https://somecompany.com/oip/faces/secure/km/DocumentDisplay.jspx?id=%22+escape(str).split(%22%20%22).join(%22+%22);}

Isisombululo esikhethiwe

Active developers are working on this, but it might take several weeks to see a change. Until then, workarounds would be needed.

(You can read and vote on the bug -- Bug 728313 – Bookmarklet fails on about:newtab -- but please avoid adding any "me too" comments since they get "spammed" to all the people following the bug.)

Funda le mpendulo ngokuhambisana nalesi sihloko 👍 0

All Replies (4)

more options

I searched for a recent thread on this but couldn't find it.

This may be the result of a security restriction on some "about" pages such as about:home and about:newtab.

Did you blank the new tab page using the little button or did you actually change the new tab page to about:blank? In case you need steps for testing:

(1) In a new tab, type or paste about:config in the address bar and press Enter. Click the button promising to be careful.

(2) In the filter box, type or paste newtab and pause while the list is filtered

(3) Double-click the browser.newtab.url preference and enter the desired value:

(i) Page thumbnails (default)

browser.newtab.url = about:newtab

(ii) Blank tab

browser.newtab.url = about:blank

(iii) Built-in Firefox home page

browser.newtab.url = about:home

(iv) Any other page

browser.newtab.url = full URL to the page
more options

Works for me on about:home and about:blank and with a middle-click on a toolbar button that I've created on the Bookmarks Toolbar with the JavaScript code.
It doesn't work if I click the bookmark with the about:newtab page open (no error in the Error Console either).

more options

I had blanked out the newtab page using the little button.

My results were the same as cor-el's. It works when blank, home, or any other URL. Not when set to about:newtab, which is what the setting was.

So is this a bug, or should I just use the workaround of setting it to blank? I kind of like the newtab functionality. Would be a shame to have to forgo it.

more options

Isisombululo Esikhethiwe

Active developers are working on this, but it might take several weeks to see a change. Until then, workarounds would be needed.

(You can read and vote on the bug -- Bug 728313 – Bookmarklet fails on about:newtab -- but please avoid adding any "me too" comments since they get "spammed" to all the people following the bug.)