molLoaderFinishedEvent calling a global js

User a92fed3a15

02-03-2009 18:19:55

Hi





I would like to call a javascript defined in global section on its html with molLoaderFinishedEvent as follows.





I tried calling 1) js:my_function(), 2) js:parent.my_function(), but it does not work.





could you advise me how to call a javascript defined outside its local scope.














Thanks,




















function my_function() {





}








<span style="background: #ffffff none repeat scroll 0% 0%; color: #000000;"><script type="text/javascript" language="javascript1.2">





<span style="background: #c0c0c0 none repeat scroll 0% 0%; color: #000000;">msketch_param("extrabonds", "arom,any,1or2,wedge,either,ctu");


msketch_param("molLoaderFinishedEvent","js:parent.my_function()");


ChemAxon 7c2d26e5cf

02-03-2009 19:20:10

From applet, you can call only locally defined JavaScript functions. So call a function whose definition is on the same document where the applet is embedded. Of course, inside the JavaScript code you can refer to an external code.