Hi Yingjie,

keep in mind that the Jmol Applet is executed inside the Browser of
the user whereas your python script runs on the webserver.
So you'll need to communicate data from the client back to the server.

The first step would be passing the data that you need from the
Java-Applet into the JavaScript (inside the Browser).
This can be done by e.g. PickCallbacks (or similar) or you can
probably assign the content of the state-file to a JavaScript variable
(as a string).

The second step would be to pass that information back to the webserver.
With JavaScript you can assign the data you want to transfer to a
<input type="hidden"> inside a <form ... method="post"> which will
send the data to the server when the form is submitted. If using a
form is too Web 1.0 for you, I'm sure you can also use an AJAX
framework to send the data to the server.

Oliver

On Tue, Mar 22, 2011 at 15:47, Yingjie Lin <[email protected]> wrote:
> Hi Jmol users,
> I am developing a web server with Jmol Applet (Jmol version 12.0.22). I need
> the user to select a set of atoms by, say, coloring them red. When the user
> is done selecting and is ready to move on to the next page, I would like my
> Python script to know which atoms are selected.
> I think this could be done by saving the Jmol display to a file, using
>  "write STATE filename.spt". This works perfectly in the Jmol program
> itself, but I couldn't get it to work in Jmol Applet. In Jmol Applet, there
> is no error message, but no file is written, and the content of the state
> file is printed to the Console.
> Does anyone know what I am missing here?
> Thank you.
> Yingjie

------------------------------------------------------------------------------
Enable your software for Intel(R) Active Management Technology to meet the
growing manageability and security demands of your customers. Businesses
are taking advantage of Intel(R) vPro (TM) technology - will your software 
be a part of the solution? Download the Intel(R) Manageability Checker 
today! http://p.sf.net/sfu/intel-dev2devmar
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to