Thanks! I start to understand how this works but I have one problem: I
cannot pass the jmolGetPropertyAsString("stateInfo") information from one
php page to another... I have tried the following with no success:

First php:
<input type="hidden" name="STATE\"
value='jmolGetPropertyAsString("stateInfo")'>

Second php:
$STATE=$_POST["STATE"];
echo "$STATE<br>";

But I get just the command, not the value... So how do you send it to the
new page? I am quite new to all this, sorry. And thanks a lot again!
Yours,
Daniel




2011/8/3 Robert Hanson <[email protected]>

> Daniel,
>
> Yes, jmolGetPropertyAsString("stateInfo") returns the exact information  to
> use to retrieve the exact state. This is what
> http://chemapps.stolaf.edu/jmol/docs/examples-12/JmolPopup.htm uses. If it
> does not reproduce the EXACT state, I want to know. (The only caveat is that
> labels can move if displayed in an applet that has a different size.) To use
> it, just run it with
>
> script [that filename]
>
> or send it to the new page as part of the page (I like to use <--
> /****Jmol Embedded Script ****   ....  **/ --> comments in the HTML and then
> just send the whole page to Jmol with JmolScript (grabbing that with
> document.getElementById(...).innerHTML. That works amazingly well, and you
> don't have to escape anything. The necessary term is
>
> /**** Jmol Embedded Script ****
>
> If Jmol finds that in a file, it reads only the data between that and
>
> **/
>
> and skips everything else in the file.
>
>
>
> On Wed, Aug 3, 2011 at 10:32 AM, Daniel Carbajo 
> <[email protected]>wrote:
>
>> The point is that I have a page where I can load many proteins, change
>> them from cartoon to spacefill to whatever, highlight residues in
>> wireframe... and then I have a button which redirects to another page which
>> is similar, but with different proteins, which are actually the same ones
>> but with temperature factor records changed with other descriptors... In
>> this second page I want to restore all the settings from the previous
>> (proteins loaded, whether they are in cartoon, spacefill, etc., residues
>> highlighted, orientation...).
>> Which do you think would be the best way to do so?
>> Does jmolGetPropertyAsString("stateInfo") return all that information? If
>> so, I am not so sure where to put it so it can be used by the second page...
>> This is my first attempt in php:
>> $content .= "<form><button type=\"submit\" onClick='var
>> state=jmolGetPropertyAsString(\"stateInfo\");
>> alert(state)'>CHECK</button></form>";
>> But I do not want a button and an alert... besides the output is cut so I
>> do not get to see everything that jmolGetPropertyAsString("stateInfo")
>> returns... Any suggestions?
>> Thanks again,
>> Daniel
>>
>>
>>
>>
>>
>>
>>
>> 2011/8/3 Rolf Huehne <[email protected]>
>>
>>> On 08/03/2011 03:04 PM, Daniel Carbajo wrote:
>>> > Hello everyone,
>>> > is it possible to save a Jmol session in terms of proteins loaded,
>>> their
>>> > displays (cartoon, spacefill...), residues selected, labels, etc. in
>>> one php
>>> > page so everything is restored in another? Can I save the session
>>> > specifications into a file that is read by another php page? I am
>>> trying
>>> > with save/restore ORIENTATION saveName, but does not seem to be
>>> working.
>>> The "save state" command does this.
>>> (see
>>>
>>> http://jena3d.fli-leibniz.de/ImgLibPDB/Jena3D/doc/jmol_scripting/index.htm#save
>>> )
>>>
>>> But you will need the "signed" Jmol applet to be able to write it
>>> directly into a file.
>>>
>>> With the "unsigned" Jmol applet you can open the Jmol console, display
>>> the state (by clicking on a button) and copy+paste the state into a text
>>> editor and save it into a file.
>>> But depending on the combination of Java, browser and operating system
>>> version there might be copy+paste problems.
>>>
>>> With both applet types you could read the state information with
>>> javascript and then send the data to a server for storage:
>>>
>>> state = jmolGetPropertyAsString("stateInfo");
>>>
>>> Depending on the location of the other PHP page and the directory
>>> organization at this site it might be becessary to adapt the state
>>> script to the new location before it is loaded properly.
>>>
>>> Regards,
>>> Rolf
>>>
>>>
>>> ------------------------------------------------------------------------------
>>> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>>> The must-attend event for mobile developers. Connect with experts.
>>> Get tools for creating Super Apps. See the latest technologies.
>>> Sessions, hands-on labs, demos & much more. Register early & save!
>>> http://p.sf.net/sfu/rim-blackberry-1
>>> _______________________________________________
>>> Jmol-users mailing list
>>> [email protected]
>>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
>> The must-attend event for mobile developers. Connect with experts.
>> Get tools for creating Super Apps. See the latest technologies.
>> Sessions, hands-on labs, demos & much more. Register early & save!
>> http://p.sf.net/sfu/rim-blackberry-1
>> _______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
> ------------------------------------------------------------------------------
> BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
> The must-attend event for mobile developers. Connect with experts.
> Get tools for creating Super Apps. See the latest technologies.
> Sessions, hands-on labs, demos & much more. Register early & save!
> http://p.sf.net/sfu/rim-blackberry-1
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
------------------------------------------------------------------------------
BlackBerry&reg; DevCon Americas, Oct. 18-20, San Francisco, CA
The must-attend event for mobile developers. Connect with experts. 
Get tools for creating Super Apps. See the latest technologies.
Sessions, hands-on labs, demos & much more. Register early & save!
http://p.sf.net/sfu/rim-blackberry-1
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to