mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2024-11-05 16:15:58 +01:00
7857d170be
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1871 b35dd754-fafc-0310-a699-88a17e54d16e
66 lines
1.7 KiB
HTML
66 lines
1.7 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
|
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
|
<title>Chat Session</title>
|
|
<script language="JavaScript" type="text/javascript">
|
|
// update the send button to be disabled/enabled
|
|
function updateButton(el) {
|
|
if (el.value != '') {
|
|
el.form.send.disabled = false;
|
|
}
|
|
else {
|
|
el.form.send.disabled = true;
|
|
}
|
|
}
|
|
function handleSubmit(el) {
|
|
// el is the form
|
|
var chatform = window.parent.frames['form'].document.chatform;
|
|
chatform.message.value = el.message.value;
|
|
chatform.submit();
|
|
el.message.value = '';
|
|
el.message.focus();
|
|
updateButton(el.message);
|
|
|
|
// return false so this form does not sumbmit:
|
|
return false;
|
|
}
|
|
</script>
|
|
</head>
|
|
|
|
<body topmargin="0" leftmargin="0" rightmargin="0" bottommargin="0">
|
|
|
|
<table cellpadding="0" cellspacing="0" border="0" width="100%">
|
|
|
|
<form name="chatform" onsubmit="return handleSubmit(this);">
|
|
|
|
<tr valign="top">
|
|
<td colspan="2" style="padding:8px;">
|
|
<iframe src="chat-conv.html" frameborder="0"
|
|
id="chatconv"
|
|
style="border:1px #ccc solid;width:100%;height:250px;" scrolling="yes"
|
|
height="100%" width="100%"></iframe>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td width="99%" style="padding:0px 2px 0px 8px;">
|
|
<textarea name="message" cols="50" rows="4" style="width:100%" wrap="virtual"
|
|
onkeyup="updateButton(this);"
|
|
onchange="updateButton(this);"></textarea>
|
|
</td>
|
|
<td width="1%" nowrap style="padding:0px 8px 0px 2px;">
|
|
<input type="submit" name="send" value="Send" style="padding-left:5px;padding-right:5px;" disabled>
|
|
</td>
|
|
</tr>
|
|
|
|
</form>
|
|
|
|
</table>
|
|
|
|
<script language="JavaScript" type="text/javascript">
|
|
document.chatform.message.focus();
|
|
</script>
|
|
|
|
</body>
|
|
</html>
|