I know Java is installed and working because I can compile and run .java files from NetBeans.

I am in a fix as I have spent many hours troubleshooting this problem but could not solve it. I am very hopeful for a solution here.

Thanks

Hello,
Sometime ago I suddenly realized that JavaScript was not working in my Firefox. I get a very explicit error message from Stack Overflow:
"Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load."
Many other websites also do not work.
I currently am running Windows 7 and on typing "java -version", I get the following output:
java version "1.7.0_40"
Java(TM) SE Runtime Environment (build 1.7.0_40-b43)
Java HotSpot(TM) 64-Bit Server VM (build 24.0-b56, mixed mode)
I know Java is installed and working because I can compile and run .java files from NetBeans.
I am in a fix as I have spent many hours troubleshooting this problem but could not solve it. I am very hopeful for a solution here.
Thanks

Chosen solution

cor-el I was experimenting and installed Firefox 25 Beta 3 and all JavaScript are working fine.

For your information Java and Javascript are completely different, so having java in doesn't gives any advantage for javascript nor it needs java.
Coming on to you problem
------------------------------------
I think you have problem with '''Cross-domain Content Scripts'''
By default, content scripts don't have any cross-domain privileges. In particular, they can't:
# access content hosted in an iframe, if that content is served from a different domain
# make cross-domain XMLHttpRequests
Check this article on mozilla addons for additional info [https://addons.mozilla.org/en-US/developers/docs/sdk/Firefox-24/dev-guide/guides/content-scripts/cross-domain.html Cross-domain Content Scripts]

Helpful Reply

Firefox has a single global setting for JavaScript: either it's enabled or it isn't. If JavaScript works on any site, then that setting should be fine. If you're not sure, you can check here:

(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 search box above the list, type or paste java and pause while the list is filtered

(3) If javascript.enabled is not set to its default value of true, double-click it to switch it back to true.

Firefox does not have a user interface for applying site-specific scripting restrictions, but this can be done using extensions or using "capability" preferences. I don't see the best known script blockers on your extension list (NoScript, YesScript, Controle De Scripts) so I suggest checking for the hidden preferences first.

Open your current Firefox settings (AKA Firefox profile) folder using

Help > Troubleshooting Information > "Show Folder" button

Scroll down to prefs.js and open it in a text editor (note: you can't save changes while Firefox is running, but you can exit Firefox if you find something you need to edit out)

Search for capab (the beginning of the word capability). Do you find any preferences that contain capability and javascript and noAccess? If so, that may explain why scripts cannot run on some sites. Feel free to post those lines here for analysis.

To test the extension possibility, could you try some of the problem sites in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: Troubleshoot Firefox issues using Safe Mode.

You can restart Firefox in Safe Mode using

Help > Restart with Add-ons Disabled

In the dialog, click "Start in Safe Mode" (not Reset)

Any change?

Firefox has a single global setting for JavaScript: either it's enabled or it isn't. If JavaScript works on any site, then that setting should be fine. If you're not sure, you can check here:
(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 search box above the list, type or paste '''java''' and pause while the list is filtered
(3) If '''javascript.enabled''' is not set to its default value of true, double-click it to switch it back to true.
----
Firefox does not have a user interface for applying site-specific scripting restrictions, but this can be done using extensions or using "capability" preferences. I don't see the best known script blockers on your extension list (NoScript, YesScript, Controle De Scripts) so I suggest checking for the hidden preferences first.
Open your current Firefox settings (AKA Firefox profile) folder using
Help > Troubleshooting Information > "Show Folder" button
Scroll down to prefs.js and open it in a text editor (note: you can't save changes while Firefox is running, but you can exit Firefox if you find something you need to edit out)
Search for '''capab''' (the beginning of the word capability). Do you find any preferences that contain capability and javascript and noAccess? If so, that may explain why scripts cannot run on some sites. Feel free to post those lines here for analysis.
----
To test the extension possibility, could you try some of the problem sites in Firefox's Safe Mode? That's a standard diagnostic tool to bypass interference by extensions (and some custom settings). More info: [[Troubleshoot Firefox issues using Safe Mode]].
You can restart Firefox in Safe Mode using
Help > Restart with Add-ons Disabled
In the dialog, click "Start in Safe Mode" (''not'' Reset)
Any change?

Question owner

anushbmx, thanks for the article, and yes are right Java and JavaScript are different. So I wasn't able to derive any meaning from all that. Still stuck.

jscher2000 I could not find anything related to capab in pref.js . And I have already tried to Troubleshoot Firefox issues using Safe Mode. It didn't work out. Thanks for the help anyway.

So, is there any other way possible? I'm ready to try anything.

anushbmx, thanks for the article, and yes are right Java and JavaScript are different. So I wasn't able to derive any meaning from all that. Still stuck.
jscher2000 I could not find anything related to capab in pref.js . And I have already tried to Troubleshoot Firefox issues using Safe Mode. It didn't work out. Thanks for the help anyway.
So, is there any other way possible? I'm ready to try anything.

Start Firefox in Safe Mode to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).

If content is missing or otherwise not working when a secure https connection is used then check if there is a shield icon to the left of the "Site Identity Button" (globe/padlock) on the location bar indicating that content is blocked.

You can use the Web Console (Firefox/Tools > Web Developer;Ctrl+Shift+K) to check the Net log to see if any content is blocked or fails to load.

Start Firefox in <u>[[Safe Mode|Safe Mode]]</u> to check if one of the extensions (Firefox/Firefox/Tools > Add-ons > Extensions) or if hardware acceleration is causing the problem (switch to the DEFAULT theme: Firefox/Firefox/Tools > Add-ons > Appearance).
*Do NOT click the Reset button on the Safe Mode start window.
*https://support.mozilla.org/kb/Safe+Mode
*https://support.mozilla.org/kb/Troubleshooting+extensions+and+themes
----
If content is missing or otherwise not working when a secure https connection is used then check if there is a shield icon to the left of the "Site Identity Button" (globe/padlock) on the location bar indicating that content is blocked.
You can use the Web Console (Firefox/Tools > Web Developer;Ctrl+Shift+K) to check the Net log to see if any content is blocked or fails to load.

ideato can be correct, ad blocker or Ad blocker plus will block javascript if the domain from which it's served from is listed in block list, try to use the website with these disabled or use incognito window.

ideato can be correct, ad blocker or Ad blocker plus will block javascript if the domain from which it's served from is listed in block list, try to use the website with these disabled or use incognito window.

Question owner

cor-el and anushbmx, I checked in safe mode also, still gives the same error message.

NOTE: I checked on 3 of my friends, there Firefox 24 ALSO shows the same warning given by Stack Overflow. How is that possible?

cor-el and anushbmx, I checked in safe mode also, still gives the same error message.
NOTE: I checked on 3 of my friends, there Firefox 24 ALSO shows the same warning given by Stack Overflow. How is that possible?

anushbmx, cor-el asked me to post a link to a publicly accessible page that doesn't require authentication (signing on).
He did not mention Java or JavaScript or a website that is problematic with Firefox at all.
If you want, then
http://stackoverflow.com/ gives me error -
"Stack Overflow requires external JavaScript from another domain, which is blocked or failed to load."
And I cannot see search results, cannot post question in http://answers.semanticweb.com/ because JavaScript is disabled.

You can open the Network tab in the Web Console and refresh the page via F5 to see if there are any files not loaded.

Do you see any blocked files in the Web Console (Firefox/Tools > Web Developer;Ctrl+Shift+K)?
*https://developer.mozilla.org/en/Tools/Web_Console
You can open the Network tab in the Web Console and refresh the page via F5 to see if there are any files not loaded.