On 10/19/2011 05:22 PM, Angel Herráez wrote:
> Martin, it is likely that the JmolScript has not yet finished when
> the Javascript submits the form.
>
Angel, I thought 'jmolEvaluate' would always wait for the result before
the javascript like 'jmolGetPropertyAsString'.
I use both for a similar task (making a snapshot image) within our
Jena3D viewer (jena3d.fli-leibniz.de):
<input class="jmol" type="button" id="snapshot" value="snapshot"
onClick='document.getElementById("bounce_image").target=Math.random();
document.getElementById("IMAGE_DATA").value=jmolGetPropertyAsString("image");
document.getElementById("IMAGE_WIDTH").value=jmolEvaluate("_width");
document.getElementById("IMAGE_HEIGHT").value=jmolEvaluate("_height");
document.getElementById("bounce_image").submit()'>
I never observed any timing problems, even if Jmol needed very long to
create a large image.
It seems as if the "select *" doesn't work with 'jmolEvaluate'.
'write("PDB")' alone does work for me.
Regards,
Rolf
------------------------------------------------------------------------------
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. Business sense. IT sense. Common sense.
http://p.sf.net/sfu/splunk-d2d-oct
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users