| 1 |
lars |
1 |
<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
2 |
|
|
|
3 |
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
|
4 |
<head>
|
|
|
5 |
<title>Prado Chat Demo</title>
|
|
|
6 |
<link rel="stylesheet" type="text/css" href="<%~ style.css %>" />
|
|
|
7 |
</head>
|
|
|
8 |
|
|
|
9 |
<body>
|
|
|
10 |
<com:TForm>
|
|
|
11 |
<h1>Prado Chat Demo</h1>
|
|
|
12 |
<noscript>Javascript is required for the chat demo to function.</noscript>
|
|
|
13 |
<div id="messages" class="messages">
|
|
|
14 |
<com:TPlaceHolder ID="messageList" />
|
|
|
15 |
</div>
|
|
|
16 |
<div id="users" class="user-list">
|
|
|
17 |
<com:TPlaceHolder ID="userList" />
|
|
|
18 |
</div>
|
|
|
19 |
<div class="message-input">
|
|
|
20 |
<com:TActiveTextBox ID="userinput"
|
|
|
21 |
Columns="40" Rows="2" TextMode="MultiLine" />
|
|
|
22 |
|
|
|
23 |
<com:TActiveImageButton ID="sendButton" CssClass="send-button"
|
|
|
24 |
ImageUrl=<%~ send.gif %> OnClick="processMessage"/>
|
|
|
25 |
</div>
|
|
|
26 |
|
|
|
27 |
<com:TTimeTriggeredCallback OnCallback="refresh"
|
|
|
28 |
Interval="2" StartTimerOnLoad="true" />
|
|
|
29 |
|
|
|
30 |
<com:TClientScript>
|
|
|
31 |
Event.observe($("<%= $this->userinput->ClientID %>"), "keypress", function(ev)
|
|
|
32 |
{
|
|
|
33 |
if(Event.keyCode(ev) == Event.KEY_RETURN)
|
|
|
34 |
{
|
|
|
35 |
if(Event.element(ev).value.length > 0)
|
|
|
36 |
new Prado.Callback("<%= $this->sendButton->UniqueID %>");
|
|
|
37 |
Event.stop(ev);
|
|
|
38 |
}
|
|
|
39 |
});
|
|
|
40 |
</com:TClientScript>
|
|
|
41 |
</com:TForm>
|
|
|
42 |
<com:TJavascriptLogger Visible="false"/>
|
|
|
43 |
|
|
|
44 |
<div id="footer">
|
|
|
45 |
Copyright © 2007 <a href="http://www.pradosoft.com">PradoSoft</a>.
|
|
|
46 |
<br/><br/>
|
|
|
47 |
<%= Prado::poweredByPrado() %>
|
|
|
48 |
</div>
|
|
|
49 |
|
|
|
50 |
</body>
|
|
|
51 |
</html>
|