From: Jonathan G. <gu...@uw...> - 2011-06-18 18:45:55
|
This is almost equivalent to what I am suggesting, but it touches _jmol, which we are calling private and thus might change. That's why I prefer a public function that causes the change. I added this simple one to my local Jmol.js for testing. function jmolToSigned(){ _jmol.archive = true; //or whatever the appropriate _jmol element is. } I unload the applet, call this function and reload the applet. It works great inside Sage. I can even tag a write command onto the recreation script and have the signed applet bring up a Save dialog after it finishes reloading. This is functionality I can patch the Jmol distribution for or we could include it. My vote is for inclusion, but I thought we should all agree before I stick it or something similar (it may need some error checking) into Jmol.js. Jonathan On Jun 18, 2011, at 1:38 PM, Angel Herráez wrote: > This replacement method also seems to work (Firefox 4 and IE8, WinXP) > > <head> > <script src="Jmol.js" type="text/javascript"></script> > <script type="text/javascript"> > function change() { > _jmol.initialized=false; > document.getElementById('jmolCont').innerHTML=''; > jmolInitialize(".",true); > jmolSetDocument(false); > document.getElementById('jmolCont').innerHTML=jmolApplet(300); > } > </script> > </head> > > <body> > <div id="jmolCont"> > <script type="text/javascript"> > jmolInitialize(".") > jmolApplet(300) > </script> > </div> > > <input type="button" value="change" onClick="change()"> > </body> > </html> > > > ------------------------------------------------------------------------------ > EditLive Enterprise is the world's most technically advanced content > authoring tool. Experience the power of Track Changes, Inline Image > Editing and ensure content is compliant with Accessibility Checking. > http://p.sf.net/sfu/ephox-dev2dev > _______________________________________________ > Jmol-developers mailing list > Jmo...@li... > https://lists.sourceforge.net/lists/listinfo/jmol-developers Dr. Jonathan H. Gutow Chemistry Department gu...@uw... UW-Oshkosh Office: 920-424-1326 800 Algoma Boulevard FAX:920-424-2042 Oshkosh, WI 54901 http://www.uwosh.edu/facstaff/gutow |