Fixed lots of XHTML errors but still not working correctly in Strict

This commit is contained in:
moodler
2006-12-22 05:42:36 +00:00
parent 9d9aa95baf
commit 0cdf34fb03
7 changed files with 41 additions and 24 deletions
+6 -6
View 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
@@ -57,13 +57,13 @@
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>
+6
View 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>
+11 -2
View File
@@ -59,9 +59,18 @@
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>';
}
}
+6 -4
View 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');
@@ -90,9 +91,10 @@
<!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");
@@ -101,7 +103,7 @@
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;
@@ -142,7 +144,7 @@
}
?>
parent.msg.scroll(1,5000000);
// -->
//]]>
</script>
</head>
<body>
@@ -151,7 +153,7 @@
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
+8 -8
View 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>
@@ -153,8 +153,8 @@
$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;
@@ -199,7 +199,7 @@
}
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" />';
@@ -211,10 +211,10 @@
// 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";
?>
+3 -3
View 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
+1 -1
View File
@@ -151,7 +151,7 @@
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();