OK, so that's done. See my other thread. Also, I did get

getAppletHtml()

working. if you check the source for
http://chemapps.stolaf.edu/jmol/jsmol/cover.htm you will see that I use
Jmol.setDocument(0) and then, in the body, just:

<table width=1000 cellpadding=10>
<tr>
<td valign=top>
<div id="appletplace1"></div>
iPad mode: In this canvas the model is already loading behind the image. It
will automatically display when it is loaded.
</td>
<td valign=top>
<div id="appletplace2"></div>
iPhone mode: In this canvas we just have an image. Clicking on the image
will load the code and display the model.
</td>
</tr></table>


(Yes, yes, I know it's a table. Just working fast here.)

And then in the head:

$(document).ready(function(){
  Jmol.setDocument(0);
  Info.deferApplet = false;
  Info.deferUncover = true;
  jmol1 = Jmol.getApplet("jmol1", Info)
  $("#appletplace1").html(Jmol.getAppletHtml(jmol1));
  Info.deferApplet = true;
  Info.deferUncover = true;
  jmol2 = Jmol.getApplet("jmol2", Info)
  $("#appletplace2").html(Jmol.getAppletHtml(jmol2));
});

Bob






On Mon, Mar 4, 2013 at 4:05 AM, Angel Herráez <angel.herr...@uah.es> wrote:

> Hi Jonathan
>
> I have 2 lines of thought
>
> 1. Using purely css to hide the divs with the unwanted Jmols -- this
> will not prevent creation, in principle, but some browsers do not
> create objects if they are hidden, I believe (style='display:none')
>
> 2. Have you tried using getAppletHtml() ? That would inject the Jmol
> object code when you need
>
>
>
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> Jmol-developers mailing list
> Jmol-developers@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jmol-developers
>



-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Chemistry Department
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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
------------------------------------------------------------------------------
Symantec Endpoint Protection 12 positioned as A LEADER in The Forrester  
Wave(TM): Endpoint Security, Q1 2013 and "remains a good choice" in the  
endpoint security space. For insight on selecting the right partner to 
tackle endpoint security challenges, access the full report. 
http://p.sf.net/sfu/symantec-dev2dev
_______________________________________________
Jmol-developers mailing list
Jmol-developers@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to