It's the line after that:
jmolApplet(
[ "440", "440" ],
"load output/hematite.out ; set messageCallback
'myMessageCallback';message DONE;");
refresh();
refreshFreq();
Your refresh() is doing it. You can't call any applet functions prior to the
applet being fully initialized. The initialization doesn't occur with the
jmolApplet() command, only some undeterminable time after the page loads
(when the applet actually shows up). Just remove your refresh() and
refreshFreq() calls, change the message to "DONE LOADING", check for that in
myMessageCallback, and run refresh();refreshFreq() when that message is
returned.
Bob
On Wed, Oct 27, 2010 at 6:27 AM, P.Canepa <[email protected]> wrote:
> This is how my index page looks like
>
> jmolInitialize(".", "jmol/JmolAppletSigned0.jar");
> jmolSetAppletColor("white");
> jmolApplet(
> [ "440", "440" ],
> "load output/hematite.out ; set messageCallback
> 'myMessageCallback';message DONE;");
>
> --
> Please consider the environment before printing this e-mail.
>
> Pieremanuele Canepa
> Room 104
> Functional Material Group
> School of Physical Sciences, Ingram Building,
> University of Kent, Canterbury, Kent,
> CT2 7NH
> United Kingdom
>
> e-mail: [email protected]
> mobile: +44 (0) 7772-9756456
> -----------------------------------------------------------
> ________________________________________
> From: Robert Hanson [[email protected]]
> Sent: Wednesday, October 27, 2010 12:23 PM
> To: [email protected]
> Subject: Re: [Jmol-users] Uncaught Error: Chrome and opera under linux
>
> my only guess is that you are calling the applet before it is initialized.
>
> On Wed, Oct 27, 2010 at 4:29 AM, P.Canepa <[email protected]<mailto:
> [email protected]>> wrote:
> Dear all
>
> I am experiencing this sort of error using my J-ICE interface when I use
> chrome under linux. This problem doesn't appear for its windows release.
>
> jmol/Jmol.js:410Uncaught Error: Error calling method on NPObject!
>
> like 410 is marked below with <<<<<<<<<<<<<<<,
>
>
> function jmolScript(script, targetSuffix) {
>
> if (script) {
>
> _jmolCheckBrowser();
>
> if (targetSuffix == "all") {
>
> with (_jmol) {
>
> for (var i = 0; i < appletSuffixes.length; ++i) {
>
> var applet = _jmolGetApplet(appletSuffixes[i]);
>
> if (applet) applet.script(script);
>
> }
>
> }
>
> } else {
>
> var applet=_jmolGetApplet(targetSuffix);
>
> if (applet) applet.script(script);
> <<<<<<<<<<<<<<<<<
> }
>
> }
>
> }
>
>
>
> Thanks, Piero
>
>
> --
> Please consider the environment before printing this e-mail.
>
> Pieremanuele Canepa
> Room 104
> Functional Material Group
> School of Physical Sciences, Ingram Building,
> University of Kent, Canterbury, Kent,
> CT2 7NH
> United Kingdom
>
> e-mail: [email protected]<mailto:[email protected]>
> mobile: +44 (0) 7772-9756456
> -----------------------------------------------------------
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]<mailto:[email protected]>
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
>
>
> --
> Robert M. Hanson
> Professor of Chemistry
> St. Olaf College
> 1520 St. Olaf Ave.
> Northfield, MN 55057
> http://www.stolaf.edu/people/hansonr
> phone: 507-786-3107
>
>
> If nature does not answer first what we want,
> it is better to take what answer we get.
>
> -- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
>
>
> ------------------------------------------------------------------------------
> Nokia and AT&T present the 2010 Calling All Innovators-North America
> contest
> Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
> $10 million total in prizes - $4M cash, 500 devices, nearly $6M in
> marketing
> Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
> http://p.sf.net/sfu/nokia-dev2dev
> _______________________________________________
> Jmol-users mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/jmol-users
>
--
Robert M. Hanson
Professor of Chemistry
St. Olaf College
1520 St. Olaf Ave.
Northfield, MN 55057
http://www.stolaf.edu/people/hansonr
phone: 507-786-3107
If nature does not answer first what we want,
it is better to take what answer we get.
-- Josiah Willard Gibbs, Lecture XXX, Monday, February 5, 1900
------------------------------------------------------------------------------
Nokia and AT&T present the 2010 Calling All Innovators-North America contest
Create new apps & games for the Nokia N8 for consumers in U.S. and Canada
$10 million total in prizes - $4M cash, 500 devices, nearly $6M in marketing
Develop with Nokia Qt SDK, Web Runtime, or Java and Publish to Ovi Store
http://p.sf.net/sfu/nokia-dev2dev
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users