Miguel, et al.,
I've committed the following getProperty() implementation:
applet.getProperty("atomDetail","<atom expression>")
for example:
atominfo = jmolAppletX.getProperty("atomDetail","selected")
This immediately returns a JSON (JavaScript Object Notation) string
that shows detail about the atoms in the atom expression.
JSON strings are trivially decoded in JavaScript -- one just
turns them into JavaScript strings by concatenating a "" (Java returns
an OBJECT, not a STRING), and then does an eval() of them. Then they
are fully fledged JavaScript objects.
For more information about JSON, see:
http://www.crockford.com/JSON/
http://www.crockford.com/JSON/js.html
http://en.wikipedia.org/wiki/JSON
For a demonstration of this method, see
http://www.stolaf.edu/people/hansonr/jmol/test/json/json.htm
Bob
--
Robert M. Hanson, [EMAIL PROTECTED], 507-646-3107
Professor of Chemistry, St. Olaf College
1520 St. Olaf Ave., Northfield, MN 55057
mailto:[EMAIL PROTECTED]
http://www.stolaf.edu/people/hansonr
"Imagination is more important than knowledge." - Albert Einstein
-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems? Stop! Download the new AJAX search engine that makes
searching your log files as easy as surfing the web. DOWNLOAD SPLUNK!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=103432&bid=230486&dat=121642
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers