Dear Jmol users,
I'm pretty new to the whole javascript thing so it took me a while
to get to this point. I've had a bit of a google and a look around the
mailing list archives. However, I have not been able to find if I'm
putting my molecule in correctly. I have jme which has made all of my
mol files which are now in my mySQL database. I have used the follow code :
----------------code---------------------------
<tr><td>Structure:</td><td colspan="4">
<script>
var mol =
<?php
if ($data['molfile'])
echo '<param name="loadInline" value="' . preg_replace("/\n/", "|",
$data['molfile']) . '">';
?>;
</script>
<script>
jmolInitialize("java/jmol");
jmolApplet(300);
jmolLoadInline(mol);
</script>
If someone could look throught it and tell me where I'm going wrong that
would be great, but I'll be happy with a nudge in the right direction.
Just to tell you I get: (as my page source)
--------------------page source----------------
<tr><td>Structure:</td><td colspan="4">
<script>
var mol =
<param name="loadInline" value="N=C(N)NC(CC(=O)O)C(=O)O
|JME 2002.04 Thu Oct 07 09:34:27 GMT-08:00 2004
|
| 12 11 V2000
| 2.1000 6.0622 0.0000 N
| 0.0000 4.8497 0.0000 N
| 2.1000 1.2124 0.0000 O
| 3.5000 6.0622 0.0000 O
| 4.2000 0.0000 0.0000 O
| 5.6000 4.8497 0.0000 O
| 4.2000 2.4249 0.0000 C
| 2.1000 3.6373 0.0000 N
| 1.4000 4.8497 0.0000 C
| 3.5000 1.2124 0.0000 C
| 4.2000 4.8497 0.0000 C
| 3.5000 3.6373 0.0000 C
| 1 9 2 0
| 2 9 1 0
| 3 10 2 0
| 4 11 2 0
| 5 10 1 0
| 6 11 1 0
| 7 10 1 0
| 7 12 1 0
| 8 9 1 0
| 8 12 1 0
| 11 12 1 0
|M END
|">;
</script>
<script>
jmolInitialize("java/jmol");
jmolApplet(300);
jmolLoadInline(mol);
</script>
<br>
cheers,
Paul
--
Research Technician
Mass Spectrometry
o The
/
o Scripps
\
o Research
/
o Institute
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Jmol-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jmol-users