2012-08-28 22:04 Europe/Helsinki: Robert Hanson:
> Main problem I see there is that you are not waiting for the applet to
> initialize. You need to do that call from within an appletReadyCallback
> function.

OK. I fixed that. I tried both Jmol.js and Jmol-JSO libraries and I'm
pretty sure my current problem is only related to data to be passed to
applet's method loadInlineString().

I've prepared a demo at http://peda.net/veraja/demo/mikko/testit/jmol


What already works:

demo-load-sdf.html:
        load SDF file via Jmol applet

demo-load-jmol.html:
        load JMZ/JMOL file via Jmol applet

demo-ajax-load-sdf.html:
load SDF file via ajax in paraller with Jmol applet loading


What does not work:

demo-ajax-load-jmol.html:
load JMZ/JMOL file via ajax in paraller with Jmol applet loading


The files demo-ajax-load-sdf.html and demo-ajax-load-jmol.html are
identical except for the file to load (ioversol.sdf vs ioversol.jmol).

I believe that the problem is around line 96 of file
"demo-ajax-load-jmol.html" where I have the binary data in javascript
variable "data" and I'm trying to call Jmol.js function
"jmolLoadInline(data)". I guess I would need to do some kind of
conversion to get the binary data to correctly end up to the applet. (If
I have understood correctly, Java strings are technically a bit
different compared to JavaScript strings. I guess this causes problems
with the binary contents in variable "data" which contains binary zeros
among other stuff.)

In short: I have a binary file contents (ZIP-archive / JMZ / .jmol) in a
variable called "data". How can I get jmolLoadInline() to work with the
full data?

The example files have been prepared to work in a local filesystem
(tested Firefox 14, Google Chrome 22 denies XHR access to files in local
filesystem so that cannot be used).

-- 
Mikko


Attachment: signature.asc
Description: OpenPGP digital signature

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to