Hmm, the fact that it works just fine at
http://chemapps.stolaf.edu/jmol/jsmol/jsmol.htm suggests that it is some
small error in JavaScript we are not seeing. Did you forget the double
quotes around that in the HTML?

<a href="javascript:Jmol.script(jmolApplet0,'write...')">Save File</a>


Jmol.script doesn't take a third parameter. So there's something odd there.
Is this an anchor? or a button?

Jmol.jmolButton(jmolApplet0,'write...','Save File');


Bob







On Thu, Jun 5, 2014 at 6:15 PM, Chris St Pourcain <
[email protected]> wrote:

> I am trying to set up a button on a web page with JSmol that will export
> an x3d file.
> I have the following for onclick
>
> javascript:Jmol.script(jmolAppletsigned0,'write X3D default.x3d','Save
> FILE');
>
> but it fails saying that there is a syntax error unexpected token <
>
> I'm rather puzzled because this works to export the state:
>
> javascript:Jmol.script(jmolAppletsigned0,'write STATE default.spt','save
> FILE');
>
> What am I doing wrong?
>
> I also have a second question:
>
> Is it possible to to save the x3d file on the webserver rather than on the
> users local machine? If so how would I do that?
>
> Thanks in advance
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>


-- 
Robert M. Hanson
Larson-Anderson Professor of Chemistry
Chair, Department of Chemistry
St. Olaf College
Northfield, MN
http://www.stolaf.edu/people/hansonr


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
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to