[LON-CAPA-cvs] cvs: loncom /homework chemresponse.pm

albertel lon-capa-cvs@mail.lon-capa.org
Thu, 30 Jun 2005 18:56:37 -0000


albertel		Thu Jun 30 14:56:37 2005 EDT

  Modified files:              
    /loncom/homework	chemresponse.pm 
  Log:
  - BUG#3957, adding 'substituent menu'
  
  
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.59 loncom/homework/chemresponse.pm:1.60
--- loncom/homework/chemresponse.pm:1.59	Mon Jun 27 10:27:25 2005
+++ loncom/homework/chemresponse.pm	Thu Jun 30 14:56:35 2005
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.59 2005/06/27 14:27:25 albertel Exp $
+# $Id: chemresponse.pm,v 1.60 2005/06/30 18:56:35 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -105,17 +105,39 @@
 function openHelpWindow() {
     window.open("/adm/jme/jme_help.html","","scrollbars=yes,resizable=yes,width=500,height=600");
 }
+function substituent(r) {document.applets.JME.setSubstituent(r);}
 </script>
 </head>
 <body bgcolor="#ffffff">
 <center>
-<applet code="JME.class" name="JME" archive="/adm/jme/JME.jar" width="440" height="390">
+<form>
+  <table width="440"><tr>
+    <td></td>
+    <td align="right">
+      <select onchange="javascript:substituent(options[selectedIndex].text)">
+        <option>Select substituent</option>
+        <option>-C(=O)OH</option>
+        <option>-C(=O)OMe</option>
+        <option>-OC(=O)Me</option>
+        <option>-CMe3</option>
+        <option>-CF3</option>
+        <option>-CCl3</option>
+        <option>-NO2</option>
+        <option>-SO2-NH2</option>
+        <option>-NH-SO2-Me</option>
+        <option>-NMe2</option>
+        <option>-C#N</option>
+        <option>-C#C-Me</option>
+        <option>-C#CH</option>
+      </select>
+    </td></tr>
+  </table>
+<applet code="JME.class" name="JME" archive="/adm/jme/JME.jar" width="440" height="390" mayscript>
 You have to enable Java and JavaScript on your machine.
 $molecule
 <param name="options" value="$options" />
 </applet><br />
 <font face="arial,helvetica,sans-serif" size="-1"><a href="http://www.molinspiration.com/jme/index.html">JME Editor</a> courtesy of Peter Ertl, Novartis</font>
-<form>
 $insert_answer
 <br />
 <input type="button" value="  Close  " onclick = "javascript:window.close()" />