Hi Craig A very interesting utility!
I'm guessing, but I think your problem is due to the factv that jmolButton() etc use the Jmol.js library, and this acts only when the page is being built/rendered. Let me explain myself: A call to jmolButton() adds HTML code while the page is loading, and so it generates the button (a form object) at page load time, which will call Jmol scripts later on upon user action. Since your method is writing on the fly to the already built and loaded page, any Jmol.js function will not work as the real working code will not get inserted into the page. I'm not sure about any workaround. Maybe using an IFRAME instead of a DIV, so you can reload the page contained within. Maybe inserting the code that jmolButton would insert (copied form inside Jmol.js), instead of jmolButton() text itself. Maybe playing with jmolSetDocument(false) Just guessing wildly, sorry ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Jmol-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jmol-users

