1. Introducing Channels - a new way to chat with other Android users!
    Dismiss Notice

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


Last Updated:

  1. Redflea

    Redflea Well-Known Member This Topic's Starter

    Joined:
    Oct 6, 2009
    Messages:
    2,623
    Likes Received:
    289
    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:

    "Notice:

    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...
     

    Advertisement
  2. messenger13

    messenger13 Well-Known Member

    Joined:
    Dec 8, 2009
    Messages:
    3,133
    Likes Received:
    381
    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 Well-Known Member This Topic's Starter

    Joined:
    Oct 6, 2009
    Messages:
    2,623
    Likes Received:
    289
    I wish I was a secret agent running Safari on the sly. ;)

    2.01, nuthin' special.
     
  4. KeithG

    KeithG Well-Known Member

    Joined:
    Nov 15, 2009
    Messages:
    103
    Likes Received:
    3
    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):
    1.  
    2. // get settings so we can config our WebView instance
    3. WebSettings settings = browser.getSettings();
    4.  
    5. // JavaScript?  Of course!
    6. settings.setJavaScriptEnabled(true);
    7.  
    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).
     

Share This Page

Loading...