mirror of
https://codeberg.org/Mercury-IM/Smack
synced 2025-09-10 18:59:41 +02:00
Initial checkin
git-svn-id: http://svn.igniterealtime.org/svn/repos/smack/trunk@1871 b35dd754-fafc-0310-a699-88a17e54d16e
This commit is contained in:
parent
bd4d3114d4
commit
7857d170be
16 changed files with 504 additions and 0 deletions
66
apps/webchat/source/web/chat-main.html
Normal file
66
apps/webchat/source/web/chat-main.html
Normal file
|
@ -0,0 +1,66 @@
|
|||
<!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>
|
Loading…
Add table
Add a link
Reference in a new issue