Menu

#531 disabled java warning is not displayed (JSO)

v12
open-fixed
Website (8)
5
2012-08-13
2012-08-13
No

Using the JSO methods in a setup similar to http://biomodel.uah.es/Jmol/JSO/simpleJmol4.htm, with unsigned applet, no jQuery , no ChemDoodle etc. options active.
(Jmol 13.0.RC5, Firefox 13 Win)

I see the applet normally. If I disable Java, instead of the warning in yellow square, a blank square is displayed.
It seems that the browser is getting a non-specified image substitute. This is the relevant generated source:

<div id="myJmol_appletdiv" style="width:100%;height:100%">
<img id="myJmol_image" src="" height="300" width="300">
</div>

If the (server-side?) image generation is not available for whatever reason, the old "please install or enable Java" note should be displayed --it is indeed implemented in JmolApplet.js

Discussion

  • Bob Hanson

    Bob Hanson - 2012-08-13

    Are you sure you have the Info parameter "useJmolOnly" set to true? Looks to me like it is switching to image mode, which is the correct action.

     
  • Bob Hanson

    Bob Hanson - 2012-08-13

    well, actually there was a different bug. See the new JmolApplet.js

     
  • Bob Hanson

    Bob Hanson - 2012-08-13
    • status: open --> open-fixed
     
  • Angel Herraez

    Angel Herraez - 2012-08-14

    Well, I updated JmoApplet.js. No difference yet.
    I was not using "useJmolOnly: true", but isn't that default? I added it, no change.
    Also tried adding "useImageOnly: false" --also default--: no change.

    Must be some of the other options, since I'm pursuing a simplest aplet setup, Jmol, no alternative formats.

    Also it might be the way I'm disabling Java (via the "Plugins Toggler" extension of Firefox) but for pages that use Jmol.js it works fine and I get the yellow square.

     
  • Bob Hanson

    Bob Hanson - 2012-08-14

    Can we have a link to the offending page? I don't see how it can be calling the image option just because there is no Java enabled.

     
  • Angel Herraez

    Angel Herraez - 2012-08-14

    I think I've got it.
    The applet code (including the fallback warning) was not being called because of a filter for disabled java.

    I've done a change in JmolApi.js that fixes it (attached, see line 56).
    The idea is
    - if useImageOnly is imposed, avoid the applet and the warning
    - if NoApplet is imposed, avoid the the applet and the warning
    - if useJmolOnly is imposed, you want to advise the user, so display the warning by letting the applet code to be inserted
    - if use of Jmol is optional, allow the applet as long as the browser+java are ok, otherwise let it fall back to other options like the image

    A sample (without the fix) is the applet at top-right of
    http://http://biomodel.uah.es/Jmol/JSO/simpleJmol3-0.htm

    (the other two applets in that page suffer of different problems which I'm working on)
    Sorry, I have limited internet access and so cannot provide a more focused example now, but that shows it.

     
  • Bob Hanson

    Bob Hanson - 2012-08-14

    I think there are a couple of problems:

    1) navigator.javaEnabled() does not work with MSIE (it reports TRUE always). So the switch to images does not work.

    2) the logic does not allow you to force the issue and avoid the image option.

    So what is happening is that Firefox is (correctly) going to the image option but not providing an out for that, and MSIE is (incorrectly) NOT going to the image option.

    The real solution is to dump all this logic business. Too crazy.

    OK, first, let's get rid of this logic maze.

    Info.use = "JAVA WEBGL HTML5 IMAGE"

    meaning check those in that order.

    Now, as for MSIE, we are just not going to be able to support MSIE browsers where the user has explicitly disabled Java. Those users will get the NO JAVA message.

    The problem with Firefox is fixed, though. That was a simple logic problem. I'm setting the default to be

    Info.use = "JAVA"

    I've checked in new JmolCore.js and JmolApi.js for that.

     

Log in to post a comment.