Robert Hanson wrote:

> yeah, that sounds right.
> _jmol.previousOnloadHandler is being assigned to itself by the
> execution of that function twice.

> We set up the initialization business so that it would only run once
> (I thought). This function is being run multiple times on your page,
> perhaps because you have multiple applets, and each is calling in
> Jmol.js.

Right. I've confirmed now that the error shows up when using two applets in the same wiki page. Not calling Jmol.js twice, but calling jmolInitialize twice (I never do that manually, but the current setup of the wiki does; a test page outside the wiki gives the same error).

But the proposed fix in    function _jmolOnloadResetForms()
is not working, the error is the same.

 if(window.onload && !_jmol.previousOnloadHandler)
    _jmol.previousOnloadHandler = window.onload;
  window.onload =
  function() {
    with (_jmol) {
      if (buttonCount+checkboxCount+menuCount+radioCount+radioGroupCount > 0) {
        var forms = document.forms;
        for (var i = forms.length; --i >= 0; )
      if (previousOnloadHandler)