User 0e345a0616
05-05-2012 10:18:35
I am displaying structures using mrvin view...but i am getting this eror in browser.....
Application error
chemaxon.mrvin.applet.JMViewlaunch
Java Plug-in 10.3.1.255
Using JRE version 1.7.0_03-b05 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Monica
----------------------------------------------------
c: clear console window
f: finalize objects on finalization queue
g: garbage collect
h: display this help message
l: dump classloader list
m: print memory usage
o: trigger logging
q: hide console
r: reload policy configuration
s: dump system and deployment properties
t: dump thread list
v: dump thread stack
x: clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------
ChemAxon 7c2d26e5cf
07-05-2012 15:17:29
Can you show the applet example where this problem occurs?
Can you send an URL or paste the applet code from the web page where you attempt to open MarvinView?
It would help a lot for us to be able to check the issue.
Can you reproduce this error with this MarvinView applet example from the ChemAxon site?
http://www.chemaxon.com/marvin/examples/applets/view/embed.html
If you use a custom applet example, please check that the Marvin codebase and/or applet main class name (chemaxon.marvin.applet.JMSketchlaunch).
User 0e345a0616
07-05-2012 17:09:43
<?php
$con = mysql_connect("localhost","root","")
or
die('Could not connect: ' . mysql_error());
mysql_select_db("mcd_db");
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<script type="text/javascript" SRC="marvin.js"></script>
</head>
<body bgcolor="#996633">
<table width="84%" height="263" border="0" align="center">
<tr>
<td width="1%"> </td>
<td bgcolor="#FFFFFF"width="92%"><img src="logo.JPG" width="689" height="120"></td>
<td width="7%" height="106"> </td>
</tr>
<tr>
<td height="31"> </td>
<td>
<table bgcolor="#FFCC00" width="98%" border="0">
<tr>
<td width="34%"> </td>
<td width="6%" height="39"><font color="#FFFF00"><strong><img src="db.gif" width="32" height="32"></strong></font></td>
<td width="12%" bgcolor="#FFCC00"><font color="#FFFF00"><font color="#000000"><strong>Database</strong></font></font></td>
<td width="10%"> </td>
<td width="17%"> </td>
<td width="1%"> </td>
<td width="20%"> </td>
</tr>
</table></td>
<td> </td>
</tr>
<tr>
<td> </td>
<td>
<table bgcolor="#FFFFFF"width="100%" height="127" border="1">
<tr>
<td height="31">SNO</td>
<td height="31">CODE</td>
<td>STRUCTURE</td>
<td>SCIENTIST</td>
<td>SAMPLE</td>
<td>AMOUNT</td>
<td>MOLECULAR WEIGHT</td>
</tr>
<tr>
<?php
$sqlstr = mysql_query("SELECT * FROM mcd_library limit 10");
while ($row = mysql_fetch_array($sqlstr))
{
?>
<td><?php echo $row['cd_id'] ?></td>
<td><?php echo $row['Code'] ?></td>
<td><script type="text/javascript">
//<!--
mview_begin("", 200, 200); //arguments: codebase, width, height
mview_param("mol", "@javascript-URI-encoded@<?php echo urlencode($row['cd_structure'])?>");
mview_end();
//-->
</script></td>
<td><?php echo $row['Scientist'] ?></td>
<td><?php echo $row['Sample'] ?></td>
<td><?php echo $row['Amount'] ?></td>
<td><?php echo $row['cd_molweight'] ?></td>
</tr>
<?php }?>
</table></td>
<td> </td>
</tr>
</table>
</body>
</html>
but same code is running in another system
ChemAxon 7c2d26e5cf
08-05-2012 12:03:09
I assume why Marvin does not load in your example.
Wrong codebase has been given in your code (empty string)::
mview_begin("", 200, 200); //arguments: codebase, width, height
If the document where the applet code is embedded is in the marvin folder (same folder than jmarvin.jar), the codebase parameter of the applet has to be "."
mview_begin(".", 200, 200); //arguments: codebase, width, height
Please correct the codebase parameter in your code.
To tell the truth, I wonder how you php code can work on other platforms since the codebase reference at "mview_begin" is wrong.