Links of the Format "javascript: void (0)" Don't Work
On several sites, links in the format javascript: void (0) don't work. A specific example is the attachment download links in Rackspace webmail. Though they are active, when clicked, nothing happens - normally, an attachment would download.
I am using the latest version of Firefox for OS X, I've tried clearing the cache, I've reset Firefox, I've used safe mode, and nothing works.
Suggestions?
Thanks.
Semua Balasan (4)
javascript:void(0) actually is a "do nothing" command. When sites use this in a link, they override it by adding a script to the link using another method, either onclick (in the link tag itself) or addEventListener (added after the page loads using a script).
It sounds as though the script is being blocked in your Firefox (possibly by security software that strips out scripts?) or the effect of the script is being blocked (possibly by an overly aggressive popup blocker?) or the script is failing for some reason (possibly cookie-related???).
Did this just start suddenly without any apparent cause, or can you associate it with a change such as upgrading from Firefox 30 to Firefox 31, or a change in other software on your Mac?
You do not appear to have extensions that could be responsible for this blocking.
Did you already try to clear the cache and remove cookies only from websites that cause problems?
"Clear the Cache":
- Firefox > Preferences > Advanced > Network > Cached Web Content: "Clear Now"
"Remove Cookies" from sites causing problems:
- Firefox > Preferences > Privacy > "Use custom settings for history" > Cookies: "Show Cookies"
This seems to have started happening on its own - no changes on my part.
Try to reinstall Firefox.
Download a new copy of the Firefox application and save the disk image file to the desktop
- Firefox 31.0: https://www.mozilla.org/en-US/firefox/all.html
- Trash the current Firefox application (open the Applications folder in the Finder and drag the Firefox application to the Trash) to do a clean (re)install
- Install the new version that you have downloaded
- https://support.mozilla.org/kb/Installing+Firefox+on+Mac
Your personal data is stored elsewhere in the Firefox profile folder, so you won't lose your bookmarks and other personal data when you uninstall and (re)install Firefox.
If you keep having problems then try a new profile.
See "Creating a profile":
- https://support.mozilla.org/kb/profile-manager-create-and-remove-firefox-profiles
- http://kb.mozillazine.org/Standard_diagnostic_-_Firefox#Profile_issues
If the new profile works then you can transfer files from a previously used profile to the new profile, but be cautious not to copy corrupted files to avoid carrying over problems.