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

albertel lon-capa-cvs@mail.lon-capa.org
Tue, 21 Oct 2003 20:49:06 -0000


albertel		Tue Oct 21 16:49:06 2003 EDT

  Modified files:              
    /loncom/homework	chemresponse.pm 
  Log:
  - Fixes BUG#2304, changed order I access elements in the JME window
    should make rings look better.
  
  
Index: loncom/homework/chemresponse.pm
diff -u loncom/homework/chemresponse.pm:1.20 loncom/homework/chemresponse.pm:1.21
--- loncom/homework/chemresponse.pm:1.20	Mon Oct 20 12:25:53 2003
+++ loncom/homework/chemresponse.pm	Tue Oct 21 16:49:06 2003
@@ -1,7 +1,7 @@
 # The LearningOnline Network with CAPA
 # chemical equation style response
 #
-# $Id: chemresponse.pm,v 1.20 2003/10/20 16:25:53 albertel Exp $
+# $Id: chemresponse.pm,v 1.21 2003/10/21 20:49:06 albertel Exp $
 #
 # Copyright Michigan State University Board of Trustees
 #
@@ -40,6 +40,7 @@
     my $smilesection;
     if (defined($smile_input)) {
 	$smilesection=<<SMILESECTION;
+        smiles = document.applets.JME.smiles();
 	opener.document.lonhomework.$smile_input.value = smiles;
 SMILESECTION
     }
@@ -58,12 +59,12 @@
 <title>Molecule Editor</title>
 <script language="JavaScript">
 function submitSmiles() {
-    smiles = document.applets.JME.smiles();
-    if (smiles == "") {
+    jmeFile = document.applets.JME.jmeFile();
+    if (jmeFile == "") {
 	alert("Nothing to submit");
     } else {
-        $smilesection
         $jmesection
+        $smilesection
 	window.close();
     }
 }