Use of Object tag instead of Applet tag (for MarvinView)

User 143c71d535

21-09-2007 18:07:37

Using my examples below, what is the correct syntax for using the HTML Object tag instead of the Applet tag? Thanks!





First, here is my successful Applet tag:


<applet name="SamMarvinMolecule" code="JMView" archive="marvin/jmarvin.jar" width="250" height="250">


<param name="mol" value="...mol-string-here..." />


<applet/>





Here is my attempt at doing the same with Object, which does not work ("class JMView not found"):


<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" width="250" height="250" name="JMView">


<param name="codebase" value="marvin"/>


<param name="archive" value="marvin.jar"/>


<param name="code" value="JMView"/>


<param name="mol" value="...mol-string-here..." />


<object/>

ChemAxon 7c2d26e5cf

24-09-2007 12:43:48

The problem is that you have refered to "marvin.js" instead of "jmarvin.js".


I recommend you to use the marvin.js interface for embedding applet code into your html. "marvin.js" provides the correct tag (applet, object or embed) in each case.


See our example: http://www.chemaxon.com/marvin/examples/applets/example-view1.1.html

User 143c71d535

24-09-2007 13:15:02

I am not sure I understand what you mean by "...you have refered to marvin.js instead of jmarvin.js". Where does my code refer to any .js file?

ChemAxon 7c2d26e5cf

24-09-2007 13:38:40

Quote:
The problem is that you have refered to "marvin.js" instead of "jmarvin.js".
Sorry, I've misstyped. Actually, you shoule type jmarvin.jar instead of marvin.jar by the "archive" param in object tag.


"jmarvin.jar" includes the applet (JMView). "marvin.jar" includes only a warning that AWT version of Marvin Applets are no more available.





Furthermore, I had recommend to use the "marvin.js" that detects the browser type and insert the proper tag for the applet in your html source.


It can also help to decrease the risk of mistyping of the value of any parameter in the object tag. :)