1. Are you ready for the Galaxy S20? Here is everything we know so far!

Javascript message (but it's already enabled) - what's up!?

Discussion in 'Android Devices' started by Redflea, Dec 23, 2009.

  1. Redflea

    Redflea Android Expert
    Thread Starter

    I'm getting a strange javascript error ("Please turn on Javascript") message when I try to access a story in the Android 2.1 News and Weather widget.

    Javascript is enabled in the default Browser settings. I also have Dolphin browser installed, but it is not set as the default.

    I have created a new News category for "Android" and one of the stories in it is "Mplayit launches Android App Store." When I click on that story, I get a full-screen error message which says:


    Javascript for Mobile Safari is turned off.

    Turn it on in Settings>Safari to view this web site."

    As noted, javascript is enabled for the default browser, and Dolphin doesn't have a javascript setting as far as I can tell.

    Appreciate any suggestions...

    1. Download the Forums for Android™ app!


  2. messenger13

    messenger13 Android Expert

    So you have a not-yet-released firmware version, and something's not working right?!? Say it isn't so!!! :D :D :D
  3. Redflea

    Redflea Android Expert
    Thread Starter

    I wish I was a secret agent running Safari on the sly. ;)

    2.01, nuthin' special.
  4. KeithG

    KeithG Well-Known Member

    Its probably using a embedded webView object to display the news story. The webView object does not have javascript enabled. Article on webViews and attaching/using native java objects within the browser..

    Code that needs to be run when instantiating the webView to enable JavaScript
    Code (Text):
    2. // get settings so we can config our WebView instance
    3. WebSettings settings = browser.getSettings();
    5. // JavaScript?  Of course!
    6. settings.setJavaScriptEnabled(true);
    This isn't something you can fix if this is the case. One way to fix it, is for the developer to launch an intent with the URL of the desired story. So that the OS will use the most appropriate app to display the content. Either being the android webkit instance or another browser that you have installed....

    This would also activate the intent picker if multiple apps have been installed that can handle the intent. (assuming you didn't set a default).

Motorola Droid Forum

The Motorola Droid release date was November 2009. Features and Specs include a 3.7" inch screen, 5MP camera, 256GB RAM, processor, and 1400mAh battery.

November 2009
Release Date

Share This Page