Dear Otis,

Both functions compSmiles() and compareSmiles() works fine. The only
problem is -- I can't able to call the function directly inside the body

<script>
  var x = 'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C@H
](CO)O)O';
  var y = 'CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O)O)O';
  document.write(compareSmiles(x, y));
</script>

Instead, as Angel Herráez suggested.. I called the function using click
event in JavaScript.

<script type="text/javascript">
function compare() {
      document.getElementById('result').innerHTML =
compareSmiles('CC1=CC2=C(C=C1C)N(C3=NC(=O)NC(=O)C3=N2)CC(C(C(CO)O)O)O',
'N(C(NC1=O)=O)=C(C1=NC2C=C3C)N(C=2C=C3C)C[C@H]([C@@H](O)[C@H](CO)O)O');
}
</script>
<body>
<input type="button" value="Compare Smiles" onClick="compare()">
<div id="result"></div>
</body>

Now it works fine.

-- 
*T. Ashok Kumar*
Head, Department of Bioinformatics
Noorul Islam College of Arts and Science
Kumaracoil, Thuckalay - 629 180
Kanyakumari District, INDIA
Mobile:- 00 91 9655307178
*E-Mail:* *ashok.bioinformat...@gmail.com <ashok.bioinformat...@gmail.com>*,
             *as...@biogem.org <as...@biogem.org>*
*Website:* *www.biogem.org <http://www.biogem.org>*
------------------------------------------------------------------------------
Site24x7 APM Insight: Get Deep Visibility into Application Performance
APM + Mobile APM + RUM: Monitor 3 App instances at just $35/Month
Monitor end-to-end web transactions and take corrective actions now
Troubleshoot faster and improve end-user experience. Signup Now!
http://pubads.g.doubleclick.net/gampad/clk?id=267308311&iu=/4140
_______________________________________________
Jmol-users mailing list
Jmol-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jmol-users

Reply via email to