Thomas Stout wrote:Sure, that makes sense. There's a reason we suggest using quotation
> Ah ha! -- Lots of good information and suggestions there - thank you
> very much!
> One of those was exactly the problem: it turns out that naming the
> script "load.script" OR load_script was problematic. Renaming to
> either "load_script.txt" or "foo" works as expected! As you suggest,
> I suspect there is some confusion arising from naming the file so
> similarly to an actual jmol command. Somehow it seemed to be parsing
> through that file looking for coordinate files to "load" and that's
> all it did....but it didn't throw an error about all the extraneous stuff!
> BTW, I've not been enclosing script names in quotes because it breaks
> my HTML (at least on Linux/Firefox). The HTML command looks like:
marks, although I'm surprised load_script did not work. Actually -- it
did -- the debug report you sent in the last email did show that the
load_script file was being read. Only "load.script" (without the
quotation marks) would cause the problem.
In any case, that's a classic problem. You can't escape quotes using \"
in an HTML tag, and here you would need three sets, because you have to
is very odd. I think it indicates you are not using Jmol.js. If that's
the case, I recommend you read up on why we recommend use of Jmol.js.
Mostly it makes life easy and provides automatic cross-browser support.
My guess is that with some browsers, for instance, "document.jmol" does
not work. So to save yourself more grief, use
and then just create the applet using
and script it using
This doesn't relate to the quotation marks problem, but it does point
you in the right direction for success, I think.
If changing the filename works, fine, but in general I recommend using
if you want to add an HTML link. That command creates the link but
doesn't have the quotation issue, because it stores the command in an
array and then calls a function that accesses that value and calls
jmolScript() with it. It also adds some nice CSS around the link so you
can control mouse-based movement around the link.
Robert M. Hanson
Professor of Chemistry
St. Olaf College
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
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
Jmol-users mailing list