I've created a simple modification/addition to the Jmol.js library that
might be useful to others.  I'm creating Jmol checkboxes "on the fly" using
the innerHTML function (innerHTML lets you add HTML anywhere within a page
without a reloading the page).  I modified several Jmol.js functions to
return the HTML string directly without writing it to the page (see code
snippet below).  You can then feed the string to innerHTML to create or
change a button or other element without re-loading the page.

Is this something that might be generally useful?  Can anybody see any
problems with doing this?  Thanks for your feedback.

Dean Johnston


function jmolButtonHTML(script, label, id, title)
{
...  (function code here)  ...
return t;
  // changed from "return _jmolDocumentWrite(t);"
}




-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers

Reply via email to