Toby White wrote: > Miguel wrote: > >>>I could, I suppose, once I've retrieved the relevant cml >>>node, use javascript to traverse the entire cml >>>subtree and write out a string of cml to pass to loadInline, but >>>that seems a very roundabout way to do things.
> Firstly, I don't like having duplicated information > if I can at all avoid it. Secondly, I have it working > at the moment using an external reference; but for > various reasons, my life would be much easier if I > only had to deal with a single file. > > But thanks for your help anyway. I'll see what I can do > with Javascript rewriting. I've now done this. If anyone else is interested, I've put the additional functionality into the Jmol.js library. My updated version is at http://www.uszla.me.uk/jmol/Jmol.js, and an example page demonstrating the functionality is at http://www.uszla.me.uk/jmol/test2.xhtml A complication worth mentioning is that to do this requires full xml/xhtml compliance; it can't be done in an HTML page. This requires (obviously) a suitably recent browser. It's working for me with firefox-1.0.4. Unfortunately, when browsers operate in xml compliance mode, they disable document.write() functionality in javascript. Since Jmol.js uses document.write() for all its output, this means that Jmol.js also has to be rewritten to use proper DOM-compliant output methods. (This is a general problem, unrelated to my initial impetus for making changes - current versions of Jmol.js will simply not work in xhtml mode browsing, even if they're being used normally.) I've done this partially; enough for my needs at the moment. However, if anyone else tries to use more of the functionality in xhtml mode, it will almost certainly fail. I should say; thanks again for writing jmol in the first place! -- Dr. Toby White Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK Email: <[EMAIL PROTECTED]> ------------------------------------------------------- SF.Net email is sponsored by: Discover Easy Linux Migration Strategies from IBM. Find simple to follow Roadmaps, straightforward articles, informative Webcasts and more! Get everything you need to get up to speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

