]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed lots of XHTML errors but still not working correctly in Strict
authormoodler <moodler>
Fri, 22 Dec 2006 05:42:36 +0000 (05:42 +0000)
committermoodler <moodler>
Fri, 22 Dec 2006 05:42:36 +0000 (05:42 +0000)
mod/chat/gui_header_js/chatinput.php
mod/chat/gui_header_js/chatmsg.php
mod/chat/gui_header_js/insert.php
mod/chat/gui_header_js/jsupdate.php
mod/chat/gui_header_js/jsupdated.php
mod/chat/gui_header_js/users.php
mod/chat/view.php

index e488871ad2be347ccf82a260dbb016187b32af35..30f5190a34d8dd9456c18f23f22dcb3d7f756d22 100644 (file)
@@ -27,8 +27,8 @@
 
     ob_start();
     ?>
-    <script type="text/javascript">
-    <!--
+    <script language="JavaScript" type="text/javascript">
+    //<![CDATA[
     var waitFlag = false;
     function empty_field_and_submit() {
         if(waitFlag) return false;
@@ -49,7 +49,7 @@
         input_chat_message.focus();
     }
 
-    // -->
+    //]]>
     </script>
     <?php
 
     print_header('', '', '', 'inputForm.chat_message', $meta, false);
 
 ?>
-    <form action="../empty.php" method="POST" target="empty" name="inputForm"
-          OnSubmit="return empty_field_and_submit()">
+    <form action="../empty.php" method="post" target="empty" name="inputForm"
+          onsubmit="return empty_field_and_submit()">
         &gt;&gt;<input type="text" id="input_chat_message" name="chat_message" size="60" value="" />
         <?php helpbutton('chatting', get_string('helpchatting', 'chat'), 'chat', true, false); ?>
     </form>
 
-    <form action="insert.php" method="POST" target="empty" name="sendForm">
+    <form action="insert.php" method="post" target="empty" name="sendForm">
         <input type="hidden" name="chat_sid" value="<?php echo $chat_sid ?>" />
         <input type="hidden" name="chat_message" />
     </form>
index 678b075cfe031a125815f0f0a2679d11b20f83d4..43e9d37fb83169afa124b9a9e6cdb8c90f957dba 100644 (file)
@@ -1,2 +1,8 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
+<head>
+<title>Dummy</title>
+</head>
 <body>
+</body>
+</html>
index 6972bcc4a73861230c42d37f02c12f2595ba2d77..ef2f965ccdae85fb6ebd3be1748dfcd3e1f57697 100644 (file)
     if ($chatuser->version == 'header_js') {
         /// force msg referesh ASAP
         if ($CFG->chat_normal_updatemode == 'jsupdated') {  // See bug MDL-6791
-            echo '<script type="text/javascript">parent.input.enableForm();</script>';
+            echo '<script language="Javascript" type="text/javascript">'.
+                 "//<![CDATA[ \n".
+                 '  parent.input.enableForm();'.
+                 "//]]> \n".
+                 '</script>';
         } else {
-            echo '<script type="text/javascript">parent.jsupdate.location.href = parent.jsupdate.document.anchors[0].href;parent.input.enableForm();</script>';
+            echo '<script language="Javascript" type="text/javascript">'.
+                 "//<![CDATA[ \n".
+                 '  parent.jsupdate.location.href = parent.jsupdate.document.anchors[0].href;'.
+                 '  parent.input.enableForm();'.
+                 "//]]> \n".
+                 '</script>';
         }
     }
 
index e372849c02429ada4860e41263409e3e11b0c799..4ad594851112c0e69f8bf4f696586db1a0775ff8 100644 (file)
@@ -68,6 +68,7 @@
 
     // no &amp; in url, does not work in header!
     $refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&chat_lasttime=$chat_newlasttime&chat_lastrow=$chat_newrow"; 
+    $refreshurlamp = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdate.php?chat_sid=$chat_sid&amp;chat_lasttime=$chat_newlasttime&amp;chat_lastrow=$chat_newrow"; 
 
     header('Expires: Sun, 28 Dec 1997 09:32:45 GMT');
     header('Last-Modified: '.gmdate('D, d M Y H:i:s').' GMT');
 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 <html>
     <head>
+        <title> </title>
         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
         <script type="text/javascript">
-        <!--
+        //<![CDATA[
         if (parent.msg.document.getElementById("msgStarted") == null) {
             parent.msg.document.close();
             parent.msg.document.open("text/html","replace");
             parent.msg.document.write("<meta http-equiv=\"content-type\" content=\"text/html; charset=utf-8\" />");
             parent.msg.document.write("<base target=\"_blank\" />");
             parent.msg.document.write("<?php echo $stylesheetshtml ?>");
-            parent.msg.document.write("</head><body class=\"mod-chat-gui_header_js course-<?php echo $chatuser->course ?>\" id=\"mod-chat-gui_header_js-jsupdate\"><div style=\"display: none\" id=\"msgStarted\">&nbsp;</div>");
+            parent.msg.document.write("<\/head><body class=\"mod-chat-gui_header_js course-<?php echo $chatuser->course ?>\" id=\"mod-chat-gui_header_js-jsupdate\"><div style=\"display: none\" id=\"msgStarted\">&nbsp;<\/div>");
         }
         <?php
         $beep = false;
         }
         ?>
         parent.msg.scroll(1,5000000);
-        // -->
+        //]]>
         </script>
     </head>
     <body>
                 echo '<embed src="../beep.wav" autostart="true" hidden="true" name="beep" />';
             }
         ?>
-       <a href="<?php echo $refreshurl ?>" name="refreshLink">Refresh link</a>
+       <a href="<?php echo $refreshurlamp ?>" name="refreshLink">Refresh link</a>
     </body>
 </html>
 <?php
index 9c4d3c7708ec02a1beb667abd81789555ed2cabe..d8da3a1db43e4b9c3c6bb7bf918b522863661f39 100644 (file)
@@ -82,7 +82,7 @@
     <head>
         <meta http-equiv="content-type" content="text/html; charset=utf-8" />
         <script type="text/javascript">
-        <!--
+        //<![CDATA[
         if (parent.msg.document.getElementById("msgStarted") == null) {
             parent.msg.document.close();
             parent.msg.document.open("text/html","replace");
@@ -93,7 +93,7 @@
             parent.msg.document.write("<?php echo $stylesheetshtml ?>");
             parent.msg.document.write("</head><body class=\"mod-chat-gui_header_js course-<?php echo $chatuser->course ?>\" id=\"mod-chat-gui_header_js-jsupdate\"><div style=\"display: none\" id=\"msgStarted\">&nbsp;</div>");
         }
-        // -->
+        //]]>
         </script>
    </head>
    <body>
             $num = 0;
         }
 
-        print '<script type="text/javascript">' . "\n";
-        print "<!-- \n\n"; 
+        print '<script language="Javascript" type="text/javascript">' . "\n";
+        print "//<![CDATA[\n\n"; 
 
         $chat_newrow = ($chat_lastrow + $num) % 2;
 
         }
 
         print 'parent.msg.scroll(1,5000000);' . "\n\n";
-        print "// -->\n";
+        print "//]]>\n";
         print '</script>' . "\n\n";
         if ($beep) {
             print '<embed src="../beep.wav" autostart="true" hidden="true" name="beep" />';
 
     // here & should be written & :-D
     $refreshurl = "{$CFG->wwwroot}/mod/chat/gui_header_js/jsupdated.php?chat_sid=$chat_sid&chat_lasttime=$chat_lasttime&chat_lastrow=$chat_newrow&chat_lastid=$chat_lastid"; 
-    print '<script type="text/javascript">' . "\n";
-    print "<!-- \n\n"; 
+    print '<script language="Javascript" type="text/javascript">' . "\n";
+    print "//<![CDATA[ \n\n"; 
     print "location.href = '$refreshurl';\n";
-    print "// -->\n";
+    print "//]]>\n";
     print '</script>' . "\n\n";
 
 ?>
index cae25eec2b7b54020dd69d6867dc0e3a5ced15d5..9023ff55be323ea5822f2cc95bf5e0f133c1d2f7 100644 (file)
@@ -58,8 +58,8 @@
 
     ob_start();
     ?>
-    <script type="text/javascript">
-    <!--
+    <script language="JavaScript" type="text/javascript">
+    //<![CDATA[
     var timer = null
     var f = 1; //seconds
     var uidles = new Array(<?php echo count($chatusers) ?>);
@@ -92,7 +92,7 @@
         }
         timer = setTimeout("update()", f*1000);
     }
-    // -->
+    //]]>
     </script>
     <?php
 
index d50ad4ced586984fcf96630d84b091e0e17587e7..e7d0a76eb3acff6b9345af844dbd32471f7ccb30 100644 (file)
             echo fullname($chatuser).'<br />';
             echo "<font color=\"#888888\">$stridle: ".format_time($lastping)."</font>";
             echo '</font></p>';
-            echo '<td></tr>';
+            echo '</td></tr>';
         }
         echo '</table>';
         print_simple_box_end();