1
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
4
<title><l>JWChat - Show Message</l></title>
5
<meta http-equiv="content-type" content="text/html; charset=utf-8">
6
<script src="emoticons.js" language="JavaScript1.2"></script>
7
<script src="shared.js" language="JavaScript1.2"></script>
8
<script src="switchStyle.js"></script>
9
<script language="JavaScript1.2">
11
var messages = new Array();
12
var curMSG = lastMSG = 0;
16
/* look for error message */
17
if (messages[curMSG].getNode().getElementsByTagName('error').item(0)) {
18
var aErr = messages[curMSG].getNode().getElementsByTagName('error').item(0);
20
if (aErr.getAttribute('code'))
21
document.getElementById('error_code').innerHTML = aErr.getAttribute('code');
22
if (aErr.firstChild.nodeValue)
23
document.getElementById('error_data').innerHTML = aErr.firstChild.nodeValue;
27
if (messages[curMSG].getSubject())
28
document.getElementById('subject').innerHTML = messages[curMSG].getSubject();
32
if (messages[curMSG].jwcTimestamp)
33
date = messages[curMSG].jwcTimestamp;
37
document.getElementById('date').innerHTML = date.toLocaleString();
40
msgbox.document.body.innerHTML = msgFormat(messages[curMSG].getBody());
44
document.forms[0].elements["prevButton"].disabled = true;
46
document.forms[0].elements["prevButton"].disabled = false;
47
if (curMSG+1==lastMSG && srcW.error_messages.length == 0)
48
document.forms[0].elements["nextButton"].disabled = true;
50
document.forms[0].elements["nextButton"].disabled = false;
53
function getNextMSG() { // gets message from roster
54
messages[lastMSG++] = srcW.error_messages[0];
55
srcW.error_messages = srcW.error_messages.slice(1,srcW.error_messages.length);
60
if (curMSG == lastMSG) {
61
if (srcW.error_messages.length > 0)
82
if (srcW.error_messages.length > 0) {
84
document.title = loc('Error'); // set title
94
<body style="margin:8px;">
95
<form name="msg" style="margin:0; padding:0;">
96
<table width="100%" height="100%">
97
<tr><td style="color: red;"><b><l>Error</l> <span id="error_code"></span>:</b> <span id="error_data"></span></td></tr>
98
<tr><td><hr noshade size="1"></td></tr>
99
<tr><td><b><l>Date</l>:</b> <span id="date"></span></td></tr>
100
<tr><td><b><l>Subject</l>:</b> <span id="subject"></span></td></tr>
101
<tr height="100%"><td height="100%"><iframe src="chat_iframe.html" id="msgbox" name="msgbox" scrolling="auto" style="width: 100%; height: 100%;"></iframe></td></tr>
102
<tr><td><hr noshade size="1"></td></tr>
103
<tr><td align="right"><button onClick="return prev();" id="prevButton"><l>prev</l></button> <button onClick="return next();" id="nextButton"><l>next</l></button> <button onClick="window.close();"><l>Close</l></button></td></tr>