How to check that MSketch works correctly

User b8eed45673

05-11-2006 13:44:01

If Java absent or disabled appears problems with JavaScript.


For example:


Code:



form.smi.value = document.msketch.getMol('mrv');


if sketch not loaded results to error.





How to check availability of document.msketch.

ChemAxon 7c2d26e5cf

06-11-2006 15:32:24

Code:



if(document.msketch != null) {


    form.smi.value = document.msketch.getMol('mrv');


}



If you are not sure that the molecule is loaded when you try to get it, define an event handler to the finishing of molecule loading. (Use the


molLoaderFinishedEvent applet parameter.)