[LON-CAPA-cvs] cvs: rat /client parameter.html

raeburn raeburn at source.lon-capa.org
Sun Nov 20 23:10:34 EST 2011


raeburn		Mon Nov 21 04:10:34 2011 EDT

  Modified files:              
    /rat/client	parameter.html 
  Log:
  - Make HTML content dynamically loaded into frames in parameter pop-up validate. 
  - Add DOCTYPE and <meta> tag.  Move <head> before <body>. 
  
  
Index: rat/client/parameter.html
diff -u rat/client/parameter.html:1.61 rat/client/parameter.html:1.62
--- rat/client/parameter.html:1.61	Mon Nov 21 01:03:09 2011
+++ rat/client/parameter.html	Mon Nov 21 04:10:34 2011
@@ -5,7 +5,7 @@
 The LearningOnline Network with CAPA
 Parameter Input Window
 //
-// $Id: parameter.html,v 1.61 2011/11/21 01:03:09 raeburn Exp $
+// $Id: parameter.html,v 1.62 2011/11/21 04:10:34 raeburn Exp $
 //
 // Copyright Michigan State University Board of Trustees
 //
@@ -71,8 +71,11 @@
 
 function choicestart() {
   this.window.choices.document.open();
-  choicewrite('<html><body>');
+  choicewrite('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
+  choicewrite('<html xmlns="http://www.w3.org/1999/xhtml">');
   choicewrite('<head>');
+  choicewrite('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
+  choicewrite('<title>LON-CAPA</title>');
   choicewrite('<style type="text/css">');
   choicewrite('<!--');
   choicewrite('body {');
@@ -86,6 +89,7 @@
   choicewrite('-->');
   choicewrite('</style>');
   choicewrite('</head>');
+  choicewrite('<body>');
 }
 
 function choiceend() {
@@ -382,6 +386,9 @@
    if (ptype=='string') {
       choicewrite(' action="javascript:stringeval();"');
    }
+   if (ptype != 'int' && ptype != 'float' && ptype != 'string') {
+       choicewrite(' action=""');
+   }
    choicewrite('>');
    if (ptype=='tolerance') {
 // 0: pscat
@@ -857,8 +864,11 @@
   }
 
   this.window.selector.document.open();
-  selwrite('<html><body>');
+  selwrite('<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">');
+  selwrite('<html xmlns="http://www.w3.org/1999/xhtml">');
   selwrite('<head>');
+  selwrite('<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />');
+  selwrite('<title>LON-CAPA</title>');
   selwrite('<style type="text/css">');
   selwrite('<!--');
   selwrite('body {');
@@ -870,7 +880,8 @@
   selwrite('-->');
   selwrite('</style>');
   selwrite('</head>');
-  selwrite('<form name="fsel"><b>'+pname+'</b><br />');
+  selwrite('<body>');
+  selwrite('<form name="fsel" action=""><b>'+pname+'</b><br />');
   selwrite('<select name="fcat" onchange="parent.catchange();">');
 
   if (ptype=='tolerance') {




More information about the LON-CAPA-cvs mailing list