Dear all

   I am trying to take some pages created more than 5 years ago in Jmol and 
bring them up to modern JSmol/Jmol standards. I’m now using the most recent 
Jmol release, and using the Jmol2.js adapter routines. I’ve got that running 
fine with a simple test page, but have not been successful with my more complex 
pages.

  In particular, my “complex” page does a lot of javascript rendering of the 
HTML, through calls in the Header section, followed by a call at the end of the 
HTML body (this allows a common framework from my own javascript library, but 
includes simple user HTML).

  As you can see in the code below, what I would like to do is to load my Jmol 
applet into a DIV after the page/document has fully loaded. I create (not 
shown) a DIV dedicated to the applet and I do the call to jmolApplet into a 
variable. Finally, after the page has loaded, I’m trying to load that variable 
into that existing DIV. Everything is working fine, but nothing loads into the 
DIV. No error messages (though I may not know everywhere to look for those).

Any advice here? If you want to play with the page, it can be found at
<http://people.chem.umass.edu/cmartin/Jmol/KissingLoopRNA/jsindex.html 
<http://people.chem.umass.edu/cmartin/Jmol/KissingLoopRNA/jsindex.html>>

And the older, functioning (and Java-only) page at
<http://people.chem.umass.edu/cmartin/Jmol/KissingLoopRNA/jsindex.html 
<http://people.chem.umass.edu/cmartin/Jmol/KissingLoopRNA/jsindex.html>>

Thanks,

Craig Martin

// ===========================================
//Global variable
var StoredCodeJmol;

//Writes to DIV JAppDIV, previously prepared
function AfterLoaded() {
        $('#JAppDIV').html(StoredCodeJmol);
}

// Set to call above after the document is fully loaded/rendered
$(document).ready(function(){AfterLoaded()});

// Temporarily turn off direct writing
jmolSetDocument(0);

StoredCodeJmol = jmolApplet([1.0,1.0], LoadScript);

//Restore direct writing by Jmol.js calls
jmolSetDocument(document);
// ===========================================

I do get the following in the console, if that’s helpful
=====================
[Log] JSmol load jmolApplet0 loadClazz... (JSmol.min.js, line 273)
[Log] JSmol load jmolApplet0 start applet... (JSmol.min.js, line 273)
[Log] JSmol exec jmolApplet0 loadClazz null -- OK (JSmol.min.js, line 272)
[Log] xhr.open async=false url=../jsmol/j2s/core/package.js (JSmol.min.js, line 
178)
[Log] xhr.open async=false url=../jsmol/j2s/core/package.js (JSmol.min.js, line 
178)
[Log] xhr.open async=false url=../jsmol/j2s/core/corejmol.z.js (JSmol.min.js, 
line 178)
[Log] xhr.open async=false url=../jsmol/j2s/java/net/UnknownServiceException.js 
(JSmol.min.js, line 178)
[Log] xhr.open async=false url=../jsmol/j2s/J/io/JmolBinary.js (JSmol.min.js, 
line 178)
[Log] xhr.open async=false url=../jsmol/j2s/J/g3d/PrecisionRenderer.js 
(JSmol.min.js, line 178)
=====================
------------------------------------------------------------------------------
Don't Limit Your Business. Reach for the Cloud.
GigeNET's Cloud Solutions provide you with the tools and support that
you need to offload your IT needs and focus on growing your business.
Configured For All Businesses. Start Your Cloud Today.
https://www.gigenetcloud.com/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to