It is synchronous.

Var x = load("http://..........?POST?_PNG_";)

can have any return your server wants to give it. I have my returning the
number of bytes saved in the file (after decoding). Jmol will wait for the
return.

I know that looks like you are loading a page into "x", but you are really
posting information to the server and waiting for a reply, with the reply
going into variable x.

On Mon, Dec 5, 2011 at 3:57 PM, Paul Pillot <[email protected]
> wrote:

> Thanks Bob,
> this is a great feature ! It means that we don't need anymore the
> jmolGetProperty imageData method to do that. (moreover, this is precisely
> the feature I needed for one of the project I'm working on)
> Is there any callback to this function (to know when the transmission has
> finished with the server, or even better, could this method receive a
> message back from the server ? I am thinking about an url that could be
> sent by the server back to Jmol when the server script has finished to
> write the remote image file)
> Paul
>
> Le 5 déc. 2011 à 22:21, Robert Hanson a écrit :
>
> Paul,
>
> I mean that any applet can send back its view as PNG or PNGJ to the
> server. Very simple creation of images, at the size of the applet, at
> least. Just have the applet send it back! It is encoded base64, so you need
> to decode that at the other end. I had problems with PHP because it also
> decoded the + as <space> and I had to manually replace those with + again:
>
>     $info = base64_decode(str_replace(" ", "+",
> $_REQUEST["?POST?_PNG_"].$_REQUEST["?POST?_PNGJ_"].$_REQUEST[_PNG_].$_REQUEST[_PNGJ_]));
>     echo file_put_contents($imagefile, $info);
>
> Bob
>
>
> On Mon, Dec 5, 2011 at 3:13 PM, Paul Pillot <
> [email protected]> wrote:
>
>> Bob, this is intriguing : I'm not sure I understand it well...
>> Do you mean that it's possible to install Jmol 12.3.8 on a server and use
>> it to generate images ? Or is it possible to generate an image file form
>> the applet, that would be sent to a server (which could send it back to the
>> user) ?
>> Paul
>>
>> Le 5 déc. 2011 à 00:28, Robert Hanson a écrit :
>>
>> The St. Olaf Molecular Playground can now be monitored and controlled
>> from any mobile device. See
>>
>> http://chemapps.stolaf.edu/jmol/mpstatus.php
>>
>> We're using a simple Excel-based organization of the presentations.
>>
>> Of general interest may be that Jmol 12.3.8 can deliver a PNG or PNGJ
>> "screen shot" to any server anywhere upon request with a simple load()
>> function call:
>>
>> var x = load("http://whatever.xyz?POST?_PNG_<http://whatever.xyz/?POST?_PNG_>
>> ")
>>
>> or
>>
>> var x = 
>> load("http://whatever.xyz?POST?_PNGJ_<http://whatever.xyz/?POST?_PNGJ_>
>> ")
>>
>> The PNG variation here does NOT include the state; the PNGJ version
>> includes the state and all necessary files to recreate the model.
>>
>> Bob
>>
>>
>>
>>
>> --
>> 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
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>>
>> http://p.sf.net/sfu/splunk-novd2d_______________________________________________
>> Jmol-users mailing list
>> [email protected]
>> https://lists.sourceforge.net/lists/listinfo/jmol-users
>>
>>
>>
>>
>> ------------------------------------------------------------------------------
>> All the data continuously generated in your IT infrastructure
>> contains a definitive record of customers, application performance,
>> security threats, fraudulent activity, and more. Splunk takes this
>> data and makes sense of it. IT sense. And common sense.
>> http://p.sf.net/sfu/splunk-novd2d
>> _______________________________________________
>> 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
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
>
> http://p.sf.net/sfu/splunk-novd2d_______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
>
> ------------------------------------------------------------------------------
> All the data continuously generated in your IT infrastructure
> contains a definitive record of customers, application performance,
> security threats, fraudulent activity, and more. Splunk takes this
> data and makes sense of it. IT sense. And common sense.
> http://p.sf.net/sfu/splunk-novd2d
> _______________________________________________
> 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
------------------------------------------------------------------------------
All the data continuously generated in your IT infrastructure 
contains a definitive record of customers, application performance, 
security threats, fraudulent activity, and more. Splunk takes this 
data and makes sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-novd2d
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to