A quick test with MSIE supports my suspicion that this is browser-dependent.
MSIE loads the applet even though the div is hidden. Your page is loading
nine applets at once in MSIE, three at time in Firefox.
My experience is that when multiple applets are loading simultaneously from
the same JAR file and the applet has never been loaded before from that site
-- isn't cached -- then Java can get all messed up and think files don't
exist because one thread has a file open and locked while another is trying
to access it. This results in the error I saw initially. The error I was
getting was "JmolApplet -- class not found"
So this is no solution!
Bob
On Mon, May 4, 2009 at 7:11 AM, Robert Hanson <hans...@stolaf.edu> wrote:
> Francois,
>
> The error I was reporting was that none of the applets load. I do see the
> toluene example. So now I can check that problem. By the way, Nick Greeves
> found a bug in the MEP mapping that might change your pictures a bit as
> well. The problem was with sampling the data on the +x, +y, +z end of the
> grid that creates the isosurface. That fix is in Jmol 11.7.34
>
> OK, so the very interesting thing here is that while the code is present on
> the page, apparently that initial jsquery code hides the applet and Java
> does not initialize the applet until the applet is actually displayed. That
> is VERY interesting. I wonder if alll browsers or earlier versions of Java
> do that. (I doubt it.) It sure solves our problem with multiple applet
> loading -- just make sure the applet is in a hidden div, and it will only
> load when the div is displayed. Very cool.
>
> I did not know this was possible, and I suspect that different browsers or
> OS will behave differently. My tests show that using:
>
> <div id="test" style="display:none">
> <script type="text/javascript">
> jmolApplet(400,"load data/1crn.pdb")
> jmolButton("spin on")
> alert("OK")
> </script>
> </div>
>
>
> The "OK" alert runs, the applet code runds, but the applet is not
> initialized, and no applet Java code is executed. Amazing.
>
> As for that page. Your jsquery code:
>
> // Execution de cette fonction lorsque le DOM sera entièrement chargé
> $(document).ready(function()
> {
> $(".hide").hide(); // Masquage des tableaux
>
> // $(".hide").eq(0).slideDown(); affichage du premier tableau
> $("input").css("cursor", "pointer"); // CSS : curseur pointeur
>
> $("input").click(function() // Clic sur la question
>
> {
> // Actions uniquement si la réponse n'est pas déjà visible
> if($(this).next().next().is(":visible") == false)
> {
> $(".hide").slideUp(); // Masquage des réponses
>
> $(this).next().next().slideDown(); // Affichage de la réponse
> placée juste après dans le code HTML
> }
> else
> {
> $(this).next().next().slideUp();
> }
> });
>
>
>
> });
>
>
>
> Is instructing all input elements to do some fancy things with the divs.
> However, that checkbox is an input element, so it's running it for it as
> well. And apparently when a div is hidden (using div.style.display="none"),
> Java unloads the applet, and when it is redisplayed (using
> div.style.display="block") the applet is completely reloaded.
>
> A solution might be to give the input buttons a class name and then refer
> that class name instead of "input" in the .click function definition.
>
> Bob
>
>
>
>
>
> On Mon, May 4, 2009 at 4:00 AM, FyD <f...@q4md-forcefieldtools.org> wrote:
>
>> Dear Bob,
>>
>> > The page doesn't work at all for me. I get a Java error for all the
>> applets.
>>
>> Works for us on windows & linux using IE, Opera & Firefox.
>>
>> > I don't understand the logic of loading all the applets initially even
>> > though they are not displayed.
>>
>> When loading a lot of applets in the same web page we observed that a
>> lot of cpu power and memory are required. After they are loaded the
>> applets do not required any cpu power. Does it make sense ?
>>
>> Moreover, many users do not have JRE installed by default; this also
>> allows hidding empty applets in a web page...
>>
>> > This is not advisable and consumes a huge
>> > amount of memory. I recommend finding a way to load the applets on
>> demand,
>> > not during page loading.
>>
>> Yes...
>>
>> > I don't know why the applets are causing the error
>> > they are, but it could be because there are so many threads opening them
>> all
>> > at the same time.
>>
>> No this is not because there are a lot of applets. When there is only
>> one the same probleme appends. See
>> http://q4md-forcefieldtools.org/RED/zTest41.php
>>
>> regards, Francois
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Register Now & Save for Velocity, the Web Performance & Operations
>> Conference from O'Reilly Media. Velocity features a full day of
>> expert-led, hands-on workshops and two days of sessions from industry
>> leaders in dedicated Performance & Operations tracks. Use code vel09scf
>> and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
>> _______________________________________________
>> Jmol-users mailing list
>> Jmol-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Register Now & Save for Velocity, the Web Performance & Operations
Conference from O'Reilly Media. Velocity features a full day of
expert-led, hands-on workshops and two days of sessions from industry
leaders in dedicated Performance & Operations tracks. Use code vel09scf
and Save an extra 15% before 5/3. http://p.sf.net/sfu/velocityconf
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users