browser freezing while applet is loading

19-03-2005 16:35:27

I have a web page with several MarvinView applets.


When I open the page in Internet Explorer and I look another window while applets are loading, they freeze the browser. If I wait the finishing of the applet loading, IE and applets work fine.





Here is the JavaScript code from one of the applets. (The others' code are similar.)


Code:
<script LANGUAGE="JavaScript1.1" src="marvin/marvin.js"></script>


<script LANGUAGE="JavaScript1.1">


<!--


try


{


    mview_name="Struc_5";


    mview_begin("marvin/", "125", "125");


    mview_param("rows", "1");


    mview_param("cols", "1");


    mview_param("bgcolor", "#FFFFFF");


    mview_param("cell0", "|Fc1ccc(C(=O)c2ccccc2)c(F)c1");


    mview_param("preload", "MolExport,SmilesExport,GraphInvariants,Parity");


    mview_end();


}


catch(er)


{


}


//-->


</script>



Can anyone help me?

ChemAxon 7c2d26e5cf

19-03-2005 16:39:09

You should delete the try - catch blocks from your JavaScript code. It seems that try - catch blocks does not permit displaying signed applet certification window if the applet's window is not in the focus.


Normally, the certification window should pop-up. It hangs on the browser running until you submit it.


Thus, modify your code like this:


Code:
<script LANGUAGE="JavaScript1.1" src="marvin/marvin.js"></script>


<script LANGUAGE="JavaScript1.1">


<!--


    mview_name="Struc_5";


    mview_begin("marvin/", "125", "125");


    mview_param("rows", "1");


    mview_param("cols", "1");


    mview_param("bgcolor", "#FFFFFF");


    mview_param("cell0", "|Fc1ccc(C(=O)c2ccccc2)c(F)c1");


    mview_param("preload", "MolExport,SmilesExport,GraphInvariants,Parity");


    mview_end();


//-->


</script>