Angel,
Here are some additional capabilities of Jmol 11 you may or may not know
about. I can't remember to what extent I publicized them.
Automatic text or textarea message reporting
---------------------------------------------
Using
jmolSetCallback("statusForm", "some_form_name")
jmolSetCallback("statusText", "some_text_name")
or
jmolSetCallback("statusForm", "some_form_name")
jmolSetCallback("statusTextarea", "some_textarea_name")
prior to
jmolApplet(...)
you can have Jmol automatically report to text or textarea elements on
the page. The difference is that "statusText" replaces that element's
value with the message and "statusTextarea" appends the message to the
value. So with a typical successful script, "statusText" replaces the
text with "Jmol script terminated". If there is an error, the text area
will end up blank. In contrast, "statusTextArea" appends messages, so a
full report is delivered there.
These aren't well tested, but they are there. See
http://www.stolaf.edu/academics/jmol/docs/examples-11/simple2.htm for an
example of their use. Maybe useful more for debugging than anything else.
?NOAPPLET
---------------
For testing the applet, I find it sometimes useful to add "?NOAPPLET" to
my URL. This instructs Jmol to substitute a textarea for the applet.
Buttons still work, but instead of effecting script commands, they
display in the textarea the command that would have been sent to the
applet if the applet had been there. For example:
http://www.stolaf.edu/academics/jmol/docs/examples-11/simple2.htm?NOAPPLET
This should work on any Jmol page.
hoverCallback
---------------
jmolSetCallback("hoverCallback", "myfunc")
sends information about the atom being hovered over to the applet. If
the operation of that function includes a jmolScript command that sets
the hover text, then the applet page can control on the fly what is
displayed whenever any atom is hovered over. For example:
function myfunc(a,mess) {
var msg
var s = mess + "" // NEVER operate on the 2nd parameter itself
if (s.charAt(0) == 'C')
msg = "yes, that is a carbon."
else
msg = "no, that is not a carbon. The carbons are grey."
jmolScript(msg)
}
sets the message that will be displayed depending upon the atom hovered
over. (Not tested on Macs)
jmolCommandInput()
-----------------------
This new function adds a simple text input and an "execute" button.
Bob
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users