MarvinSketch applet loading problem

User eb282fcb6c

08-05-2006 13:34:38

Hi,





We're putting a website together using the MarvinSketch applet. Most of the time it works well but occassionally we're getting test users (in other organisations) say they get they get a box with a cross in where the drawing tool should be and a message at the bottom of the browser saying "Loading Java Applet Failed...".





I was wondering if anyone had ideas as to what may be causing this?





Thank you,





Pat Boyce





p.s. The code we used to load the applet is:





<script language="JavaScript1.1" src="marvin/marvin.js"></script>


<script language="JavaScript1.1" src="marvin/js2java.js"></script>





and





<script language="JavaScript1.1">


var isJs2Java = isLiveConnect();





function exportMol(format)


{


if((document.MSketch != null) && isJs2Java)


{


var s = document.MSketch.getMol(format);


//s = unix2local(s); // Convert "\n" to local line separator


s = s.replace(/\n/g, '2break2')


document.Form1.hiddenMolText.value = s ;





}


else if(!isJs2Java)


{








if(format == 'smiles')


{


setIsCompressed(false);


} else


{


setIsCompressed(true);


}


setMethod("MSketch.getMol","java.lang.String");


addMethodParam(format);


setPostJsMethod("parent.printMol()");


runMethod();


}


}

ChemAxon 7c2d26e5cf

08-05-2006 13:47:12

The red cross in a blank applet indicates that the Java Plugin is missing or the installed one is not the proper version for the applet.


Can you give us more info about the problematic software environment (operating system/browser version/ java plugin)?

User eb282fcb6c

08-05-2006 14:25:39

Hi,





The users were using internet explorer. I guess from what you said they either didn't have the Java plug-in or the incorrect one. We're using MarvinSketch applet 4.0.4. We want to make the website as accessible as possible. Is there anyway we can test and prompt users to install the correct Java plug-in?





Regards,





Pat Boyce

ChemAxon 7c2d26e5cf

12-05-2006 21:20:48

I can not suggest universal solution for detecting Java version.


The "marvin.js" script try to find out the Java type from the browser version. In most cases, it is managed. JavaScript can not get (in all cases) the exact version number of the Java Plugin.





I suggest the usage of OBJECT and EMBED tags. Because these tags support "classid" and "type attributes. By using these attributes you can specify which Java is required for the current applet. If the required (or higher) version of Jave is not installed, the browser try to install the plugin.


You can read more about OBJECT and EMBED tags in the following document: ttp://java.sun.com/j2se/1.4.2/docs/guide/plugin/developer_guide/using_tags.html





By loading the following URL, you can collect info about your browser:


http://www.chemaxon.com/test/browsertest.html


Would you share your experience about problematical platforms (operating system, browser type, Java version) which did not support running your applets?

User fe1800a729

15-05-2006 20:18:59

Hi Tamas,





I had a similar problem with Internet explorer on a remote site, where a grey box and a red cross are displayed when viewing a web page containing a marvin applet.





It appeared to be the java module that was causing the problem, the following steps resolved the issue. Point the browser to a web page with a chemaxon Marvin module (I used the Marvin example page on this site).





Solution:





When you click on the link to open the webpage, a java icon appears in the system tray in the bottom right hand corner of the screen.


You need to right mouse click on that and choose Open Control Panel


On the General tab click on the Network Settings button


Make sure that the Use Browser Settings option is checked.


Click OK


Click OK





This should allow the Marvin module to load, and display the structure.





Hope this helps.

ChemAxon 7c2d26e5cf

18-05-2006 14:05:30

Thanks.