Daniel, I sure can explain what the code above does. For the rest of your
demand (messages loaded, residues selected, distances, etc...) it's something I
could do but it would take too long to write and explain it. You'd have to
parse the messages, depending on the previous actions the users has made... To
me it's a few days job... (writing, testing, etc...).
-Paul
Le 15 sept. 2011 à 16:34, Daniel Carbajo a écrit :
> Hi Paul!
> can you explain me a little bit what this does? I'm not good at
> javascripting... How can I make the messages be models loaded, residues
> selected, distances, etc.? By the way, have a look at the example page above,
> the username and password are the same I sent you for my other examples.
> Thanks!
>
>
> 2011/9/15 Paul Pillot <paul.pil...@ac-orleans-tours.fr>
> Hi Daniel,
> for example, in your jmol initialization script you could have
>
> set messagecallback "answer"
Here you tell Jmol to send messages to the javascript function named answer()
>
> in your javascript you can have the following function
>
> function answer(txt1,txt2) {
> var messageBox = document.getElementById("textbox");
> messageBox.value = txt2 + "\n" + messageBox.value
> }
here you say that the first argument received by your function answer, should
be stored in txt1 (that's the applet name), and the second one in txt2 (that's
the message we want)
then you create an alias for the document object which id is "textbox", and you
call that alias messageBox
then you change the value of your text box to the message you received (txt2),
plus a line break, plus the previous message that was written in your textbox.
That makes the messages add to each other.
>
> in your HTML you can have the following
>
> <textarea rows="10" cols="30" id="textbox">Messages displayed here !<textarea>
That's the textarea where your messages are displayed. You can also set that to
a div, which innerHTML content you change, but the textarea is the easiest way
to do it
------------------------------------------------------------------------------
Doing More with Less: The Next Generation Virtual Desktop
What are the key obstacles that have prevented many mid-market businesses
from deploying virtual desktops? How do next-generation virtual desktops
provide companies an easier-to-deploy, easier-to-manage and more affordable
virtual desktop model.http://www.accelacomm.com/jaw/sfnl/114/51426474/
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users