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; )
forms[i].reset();
}
if (previousOnloadHandler)
previousOnloadHandler();
}
}
}
------------------------------------------------------------------------------
SF.Net email is Sponsored by MIX09, March 18-20, 2009 in Las Vegas, Nevada.
The future of the web can't happen without you. Join us at MIX09 to help
pave the way to the Next Web now. Learn more and register at
http://ad.doubleclick.net/clk;208669438;13503038;i?http://2009.visitmix.com/
_______________________________________________
Jmol-developers mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-developers