Dear Rick, Eric, What the simpler solution is I don't know, but I can tell what I do (since a long time, before jmol.js emerged, so it could be a bit outdated...): Write your comments in javascript in a data array data[1], data[2] where the index corresponds to the frame number it is related to, and use function JSAnimcontrol (appname,frameno) { document.some.textarea.value = data(frameno); } In the applet include AnimFrameCallback='JSAnimcontrol' For an example look at the source of http://cheminf.cmbi.ru.nl/wetche/organic/cyclohexane/jm/mecyc.html which looks cumbersome, but it is entirely generated by script from a computational output file.
Hens >Dear Rick, > >In FirstGlance in Jmol, I use the message command and >messageCallback(). (I do not use jmol.js.) I use "message" to mark >the beginning and end of blocks in the message stream. Then I use >those marks to parse out what I need. > >You could do the same, something like this: > >message begin comment >message Here is a two-line comment >message that I would like to display in a textarea. >message end comment > >Then you need to write javascript to watch each line coming through >messageCallback(), and trap lines following "begin comment", then >display in the textarea what was trapped when "end comment" comes along. > >Perhaps someone else knows a simpler way? > >-Eric > >At 1/8/07, you wrote: > > > > >>I have several anaimations where I would like to print comments to a >>textarea controlled by the animation sequence. I have experimented with the >>SetCallback("meassageCallback", javascript_function) which works well, >>except that I get messages from everything (status, error, echos etc). Is >>there a way to limit this to just the message commmands? (set loglevel does >>not have the desired effect.) >> >>Thanks, Rick Spinney >> >> >> ------------------------------------------------------------------------- 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 Jmol-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jmol-users