html page cannot see JMView class

User fe5cbe5ff5

11-11-2008 22:44:04

Hi,


I am using the following code in my html file to show the structure of a compound:


<h2>Compound Structure</h2><br></br>


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


<script language="JavaScript1.1">


var smStr=document.getElementById('smiles').innerHTML;


mview_begin("http://www.chemaxon.com/marvin", 400, 400);


mview_param("background","ffffff");


mview_param("molbg","#ffffff");


mview_param("mol",smStr);


mview_end();





</script>


This is the code in the parent window which needs to be refreshed after closing the popup window that I open from the parent window. I found out that if I remove the applet there is no problem in refreshing the parent window but when I add the applet code back in, the refresh does not happen until I click on the browsers reload button manually. I really need to refresh the parent window (as soon as the user closes the popup) to show the data newly added using the popup. I am using Spring Framework with Hibernate (for persistence) and wicket (for UI). Please help!





Thanks,


Anu

ChemAxon e274e1bada

12-11-2008 00:15:06

I have moved this topic to the appropriate forum. An expert will answer soon.


Edvard

User fe5cbe5ff5

12-11-2008 15:40:10

Sorry, somehow a part of my message got cut when I was pasting it.





When I realized that the applet is causing this problem, I wanted to see if embedding the applet using the <applet> tag instead of using Javascript would make any difference at all, but the problem with that is that I always get the ClassNotFoundException for JMView. I also did an unjar of jmarvin.jar and placed the JMView class in a different folder in the application but still got the same exception. somehow I was unsuccessful in making the JMView class visible.


My code with applet tag is as follows:





<applet codebase="js/" code="JMView" width=400 height=400>


<param name="background" value="#ffffff"></param>


<param name="molbg" value="#ffffff"></param>


<param name="mol" value="&{document.getElementById('sm').innerHTML};">


</param>


</applet>


<br></br>





also tried changing the codebase and adding the archive param but still got the same exception.





Thanks,


Anu

ChemAxon 7c2d26e5cf

13-11-2008 17:06:57

Unwrapping jmarvin.jar was not a good idea.The manifest file of the jar includes important information (classpath for further Marvin jars).


To be able to run JMView applet, jmarvin.jar is not enough. It contains only some base classes.


The whole marvin directory is required for the proper running of the applet: required files to run Marvin applets.


The correct form is the applet tag for MarvinView is described in this example: MarvinView Example - Embedding MarvinView applet in HTML pages