Egon Willighagen wrote:
Some weeks back [1] I saw a commit which allowed the Jmol applet to extract a DOM fragment from the webpage,
Indeed - this was me. The code is available and working from current CVS - I haven't finished documentation for it yet, though, so I hadn't announced it properly. It works roughly like you guessed; a full worked example is available at http://www.uszla.me.uk/~tow/jmolDOM/testDOM.xhtml. Adapting your example: <html xmlns="real-xhtml"> <object> <!-- the Jmol applet --> <param name="loadNodeId" value="myMolecule"/> </object> <cml xmlns="cml" id="myMolecule"> <molecule> <!-- atoms etc --> </molecule> </cml </html> That is, you need to assign an id to molecules you want to display, and then pass that to the applet as an argument. (whether directly or through a javascript wrapper function) The cml itself can appear anywhere within the document. Note, though: It does require proper full xhtml compliance (and a browser to suit - recent firefox/mozilla/opera are all fine; IE is not and will not be) otherwise there's no proper XML namespace support. I am actually using this, though not on anything publically available just yet (other than the above-mentioned example page) -- Dr. Toby White Dept. of Earth Sciences, Downing Street, Cambridge CB2 3EQ. UK Email: <[EMAIL PROTECTED]> Tel: +44 1223 333464 Fax: +44 1223 333450 ------------------------------------------------------- SF.Net email is sponsored by: Tame your development challenges with Apache's Geronimo App Server. Download it for free - -and be entered to win a 42" plasma tv or your very own Sony(tm)PSP. Click here to play: http://sourceforge.net/geronimo.php _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

