summaryrefslogtreecommitdiff
path: root/demos/chat/protected/pages/Home.page
diff options
context:
space:
mode:
authorwei <>2007-01-04 11:23:26 +0000
committerwei <>2007-01-04 11:23:26 +0000
commitdd028bec3822d1d9c28c35d599d687e038c7705f (patch)
treef3d2fb7f95073ea481a4dec86f0f0d30c7fe3588 /demos/chat/protected/pages/Home.page
parentcac90ea6547fe194ab6ab101dfe11a0b751823ca (diff)
Add chat demo and tutorial.
Diffstat (limited to 'demos/chat/protected/pages/Home.page')
-rw-r--r--demos/chat/protected/pages/Home.page51
1 files changed, 51 insertions, 0 deletions
diff --git a/demos/chat/protected/pages/Home.page b/demos/chat/protected/pages/Home.page
new file mode 100644
index 00000000..b896cd28
--- /dev/null
+++ b/demos/chat/protected/pages/Home.page
@@ -0,0 +1,51 @@
+<!doctype html public "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+ <title>Prado Chat Demo</title>
+ <link rel="stylesheet" type="text/css" href="<%~ style.css %>" />
+</head>
+
+<body>
+<com:TForm>
+<h1>Prado Chat Demo</h1>
+<noscript>Javascript is required for the chat demo to function.</noscript>
+<div id="messages" class="messages">
+ <com:TPlaceHolder ID="messageList" />
+</div>
+<div id="users" class="user-list">
+ <com:TPlaceHolder ID="userList" />
+</div>
+<div class="message-input">
+ <com:TActiveTextBox ID="userinput"
+ Columns="40" Rows="2" TextMode="MultiLine" />
+
+ <com:TActiveImageButton ID="sendButton" CssClass="send-button"
+ ImageUrl=<%~ send.gif %> OnClick="processMessage"/>
+</div>
+
+<com:TTimeTriggeredCallback OnCallback="refresh"
+ Interval="2" StartTimerOnLoad="true" />
+
+<com:TClientScript>
+ Event.observe($("<%= $this->userinput->ClientID %>"), "keypress", function(ev)
+ {
+ if(Event.keyCode(ev) == Event.KEY_RETURN)
+ {
+ if(Event.element(ev).value.length > 0)
+ new Prado.Callback("<%= $this->sendButton->UniqueID %>");
+ Event.stop(ev);
+ }
+ });
+</com:TClientScript>
+</com:TForm>
+ <com:TJavascriptLogger Visible="false"/>
+
+<div id="footer">
+Copyright &copy; 2007 <a href="http://www.pradosoft.com">PradoSoft</a>.
+<br/><br/>
+<%= Prado::poweredByPrado() %>
+</div>
+
+</body>
+</html> \ No newline at end of file