This turns out to be more complicated than I thought. It depends WHERE on the 
JSmol page you want to include the Unicode character.

label "\u2022"; suggested by Bob works for a unicode BULLET in the 
body of a page inside href="javascript:jmolScript(‘load etc.
e.g. http://www.chemtube3d.com/RAD-chlorination%20of%20alkanes.html works

but NOT in the var block within <head> in the script: section. Adding the 
&quot; to the script there causes nothing to load.

 Is this expected?

Angel: Would your neat js approach work in the var block too?

I agree it is a special case but I do have pages that need to load lone pairs 
or even radical dots in the starting structure.


Aha, so it's a challenge!
I can't resist those, let's see...

As I said, problems with quotes... take some code out to a js function.
Try this, it's working for me:

<script type="text/javascript">
function labelDot() {
  return 'label "\u2022\";';
}
</script>


<area shape="rect" coords="88,136,183,230" href="javascript:jmolScript('load
 model/Clradterm.xyz;....jmolscript commands...;set labelOffset 0 0;font label
20 serif bold;color
 label orange; ' + labelDot() + '.... more jmolscript commands.... ')" />


Best regards
Nick
--
Nick Greeves                            via OS X Mail
Director of Teaching and Learning
Department of Chemistry
University of Liverpool
Donnan and Robert Robinson Laboratories
Crown Street, LIVERPOOL L69 7ZD U.K.
Email address:    [email protected]<mailto:[email protected]>
WWW Pages:    http://www.chemtube3d.com
Tel:            +44 (0)151-794-3506 (3500 secretary)
Dept Fax:   +44 (0)151-794-3588


------------------------------------------------------------------------------
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to